[nautilus/gnome-3-20] file-operations: fix copying from the trash



commit 0d0d95d2cbab6973c1df45787f8dfa66b79f3f21
Author: Ondrej Holy <oholy redhat com>
Date:   Mon Sep 29 13:00:33 2014 +0200

    file-operations: fix copying from the trash
    
    Use original basename (not path) when creating target path.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=721981

 libnautilus-private/nautilus-file-operations.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libnautilus-private/nautilus-file-operations.c b/libnautilus-private/nautilus-file-operations.c
index 74ae194..3b531f1 100644
--- a/libnautilus-private/nautilus-file-operations.c
+++ b/libnautilus-private/nautilus-file-operations.c
@@ -3632,7 +3632,7 @@ get_target_file_with_custom_name (GFile *src,
 
                        /* if file is being restored from trash make sure it uses its original name */
                        if (g_file_has_uri_scheme (src, "trash")) {
-                               copyname = g_strdup (g_file_info_get_attribute_byte_string (info, 
G_FILE_ATTRIBUTE_TRASH_ORIG_PATH));
+                               copyname = g_path_get_basename (g_file_info_get_attribute_byte_string (info, 
G_FILE_ATTRIBUTE_TRASH_ORIG_PATH));
                        }
 
                        if (copyname == NULL) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]