diff options
author | Debarshi Ray <debarshir@gnome.org> | 2014-11-19 19:14:03 +0100 |
---|---|---|
committer | Debarshi Ray <debarshir@gnome.org> | 2014-11-21 13:30:24 +0100 |
commit | fe6bec3a03b219f0a5036b0d388c5a37c132b3dc (patch) | |
tree | 5c2229aeb642e8710c7509f9752f71dece7bcf08 /libnautilus-private/nautilus-file.c | |
parent | ae4d4960d1c3e6316de0d1fd01fd34c88f65d673 (diff) | |
download | nautilus-fe6bec3a03b219f0a5036b0d388c5a37c132b3dc.tar.gz |
file: Let renames work on Google Drive
Renaming an item on Google Drive does not change the actual GVfs path
because the path is made up of document-ids, which do not change. A
rename operation only affects the title of the entry. In GIO terms,
only the standard::display-name changes, but the standard::name remains
the same.
Therefore, if there is already a file with the same standard::name,
then don't mark it as gone if it is the same file that we are renaming.
https://bugzilla.gnome.org/show_bug.cgi?id=740383
Diffstat (limited to 'libnautilus-private/nautilus-file.c')
-rw-r--r-- | libnautilus-private/nautilus-file.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libnautilus-private/nautilus-file.c b/libnautilus-private/nautilus-file.c index c466ff92e..a22fdeda4 100644 --- a/libnautilus-private/nautilus-file.c +++ b/libnautilus-private/nautilus-file.c @@ -1732,10 +1732,11 @@ rename_get_info_callback (GObject *source_object, new_name = g_file_info_get_name (new_info); /* If there was another file by the same name in this - * directory, mark it gone. + * directory and it is not the same file that we are + * renaming, mark it gone. */ existing_file = nautilus_directory_find_file_by_name (directory, new_name); - if (existing_file != NULL) { + if (existing_file != NULL && existing_file != op->file) { nautilus_file_mark_gone (existing_file); nautilus_file_changed (existing_file); } |