Blob Blame History Raw
From 9d357d28adb47b57e48007b516ee5e1f9292d79e Mon Sep 17 00:00:00 2001
From: Leigh Scott <leigh123linux@gmail.com>
Date: Sun, 8 Dec 2019 23:59:38 +0000
Subject: [PATCH] file-operations: fix copying from the trash

---
 libnemo-private/nemo-file-operations.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libnemo-private/nemo-file-operations.c b/libnemo-private/nemo-file-operations.c
index f23a61837..8efdcdfc5 100644
--- a/libnemo-private/nemo-file-operations.c
+++ b/libnemo-private/nemo-file-operations.c
@@ -3532,7 +3532,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) {