diff options
author | Alexandru Pandelea <alexandru.pandelea@gmail.com> | 2016-09-21 14:25:03 +0300 |
---|---|---|
committer | Alexandru Pandelea <alexandru.pandelea@gmail.com> | 2016-09-21 23:45:04 +0300 |
commit | 7ff0940a0688ff3700a85d1e7219d2992cc42fd0 (patch) | |
tree | 06150b09eb27fee74161a13df198a8678439e779 | |
parent | 270b9a2883c0725a38a9c180e1e2a46dfbe08bfc (diff) | |
download | nautilus-7ff0940a0688ff3700a85d1e7219d2992cc42fd0.tar.gz |
file: mark file with error on batch rename as skipped
Files that give an error on renaming shouldn't be added to the undo
list, so those should be marked as skipped.
https://bugzilla.gnome.org/show_bug.cgi?id=771487
-rw-r--r-- | src/nautilus-file.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/nautilus-file.c b/src/nautilus-file.c index ef5975731..b5160119d 100644 --- a/src/nautilus-file.c +++ b/src/nautilus-file.c @@ -2303,10 +2303,6 @@ real_batch_rename (GList *files, continue; } - else - { - old_files = g_list_append (old_files, location); - } g_assert (G_IS_FILE (location)); @@ -2320,8 +2316,6 @@ real_batch_rename (GList *files, data->op = op; data->file = file; - new_files = g_list_append (new_files, new_file); - g_file_query_info_async (new_file, NAUTILUS_FILE_DEFAULT_ATTRIBUTES, 0, @@ -2335,6 +2329,13 @@ real_batch_rename (GList *files, g_warning ("Batch rename for file \"%s\" failed", nautilus_file_get_name (file)); g_error_free (error); error = NULL; + + op->skipped_files++; + } + else + { + old_files = g_list_append (old_files, location); + new_files = g_list_append (new_files, new_file); } } |