[glib] Only do the chmod NOFOLLOW_SYMLINK checks with HAVE_SYMLINK
- From: Benjamin Otte <otte src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [glib] Only do the chmod NOFOLLOW_SYMLINK checks with HAVE_SYMLINK
- Date: Tue, 1 Sep 2009 19:35:14 +0000 (UTC)
commit bb7852e34b1845e516290e1b45a960a345ee8a43
Author: Benjamin Otte <otte gnome org>
Date: Tue Sep 1 20:36:31 2009 +0200
Only do the chmod NOFOLLOW_SYMLINK checks with HAVE_SYMLINK
gio/glocalfileinfo.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c
index 7933ed9..b4e77d9 100644
--- a/gio/glocalfileinfo.c
+++ b/gio/glocalfileinfo.c
@@ -1877,13 +1877,15 @@ set_unix_mode (char *filename,
if (!get_uint32 (value, &val, error))
return FALSE;
-
+
+#ifdef HAVE_SYMLINK
if (flags & G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS) {
g_set_error_literal (error, G_IO_ERROR,
G_IO_ERROR_NOT_SUPPORTED,
_("Cannot set permissions on symlinks"));
return FALSE;
}
+#endif
if (g_chmod (filename, val) == -1)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]