1
0
mirror of https://gitlab.gnome.org/GNOME/glib.git synced 2025-07-27 20:33:28 +02:00

Only do the chmod NOFOLLOW_SYMLINK checks with HAVE_SYMLINK

This commit is contained in:
Benjamin Otte
2009-09-01 20:36:31 +02:00
parent 8212aadac7
commit bb7852e34b

@@ -1878,12 +1878,14 @@ set_unix_mode (char *filename,
if (!get_uint32 (value, &val, error)) if (!get_uint32 (value, &val, error))
return FALSE; return FALSE;
#ifdef HAVE_SYMLINK
if (flags & G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS) { if (flags & G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS) {
g_set_error_literal (error, G_IO_ERROR, g_set_error_literal (error, G_IO_ERROR,
G_IO_ERROR_NOT_SUPPORTED, G_IO_ERROR_NOT_SUPPORTED,
_("Cannot set permissions on symlinks")); _("Cannot set permissions on symlinks"));
return FALSE; return FALSE;
} }
#endif
if (g_chmod (filename, val) == -1) if (g_chmod (filename, val) == -1)
{ {