diff options
Diffstat (limited to 'src/nautilus-batch-rename-utilities.c')
-rw-r--r-- | src/nautilus-batch-rename-utilities.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/nautilus-batch-rename-utilities.c b/src/nautilus-batch-rename-utilities.c index bb260c545..d7cdbb367 100644 --- a/src/nautilus-batch-rename-utilities.c +++ b/src/nautilus-batch-rename-utilities.c @@ -353,7 +353,10 @@ batch_rename_format (NautilusFile *file, gchar *metadata; file_name = nautilus_file_get_display_name (file); - extension = nautilus_file_get_extension (file); + if (!nautilus_file_is_directory(file)) + { + extension = nautilus_file_get_extension (file); + } new_name = g_string_new (""); @@ -430,11 +433,16 @@ batch_rename_format (NautilusFile *file, { case ORIGINAL_FILE_NAME: { - g_autofree gchar *base_name = NULL; - - base_name = eel_filename_strip_extension (file_name); - - new_name = g_string_append (new_name, base_name); + if (nautilus_file_is_directory(file)) + { + new_name = g_string_append (new_name, file_name); + } + else + { + g_autofree gchar *base_name = NULL; + base_name = eel_filename_strip_extension (file_name); + new_name = g_string_append (new_name, base_name); + } } break; |