Bug 593406 - Permissions set to 777 after copying via Nautilus
authorBenjamin Otte <otte@gnome.org>
Tue, 1 Sep 2009 09:54:48 +0000 (11:54 +0200)
committerBenjamin Otte <otte@gnome.org>
Tue, 1 Sep 2009 10:15:31 +0000 (12:15 +0200)
commite695c0932f5d02f3b222f0b7a3de1f8c00ba7b81
tree94b4a7779395fd7e10f812d933768290954df8a1
parente967a47117d3b8fdb3e5c786e9069872d8e787c4
Bug 593406 - Permissions set to 777 after copying via Nautilus

When doing a g_file_copy() with nofollow-symlinks (to copy a link for
example), the later copying of the file attributes copies the source
links 777 attributes to the target's attributes. As chmod affects the
symlink target, this would cause such copies to always set the target to
777 mode.

This patch makes setting the mode with nofollow-symlinks fail with
NOT_SUPPORTED.

The aforementioned g_file_copy() will still succeed, because it ignores
errors of the attribute copy.
gio/glocalfileinfo.c