[nautilus/gnome-3-4] undo: use g_file_info_get_attribute_byte_string for trash::orig-path



commit bc3f1d8ffff2b3ca6336cef2bd5304c3f12b7418
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Fri Apr 13 12:59:48 2012 -0400

    undo: use g_file_info_get_attribute_byte_string for trash::orig-path
    
    Since that's what GVfs sets.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=673776

 .../nautilus-file-undo-operations.c                |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/libnautilus-private/nautilus-file-undo-operations.c b/libnautilus-private/nautilus-file-undo-operations.c
index a84237d..0869522 100644
--- a/libnautilus-private/nautilus-file-undo-operations.c
+++ b/libnautilus-private/nautilus-file-undo-operations.c
@@ -1106,17 +1106,16 @@ trash_retrieve_files_to_restore_thread (GSimpleAsyncResult *res,
 		GFile *item;
 		GTimeVal timeval;
 		glong trash_time, orig_trash_time;
-		char *origpath;
+		const char *origpath;
 		GFile *origfile;
 		const char *time_string;
 
 		while ((info = g_file_enumerator_next_file (enumerator, NULL, &error)) != NULL) {
 			/* Retrieve the original file uri */
-			origpath = g_file_info_get_attribute_as_string (info, G_FILE_ATTRIBUTE_TRASH_ORIG_PATH);
+			origpath = g_file_info_get_attribute_byte_string (info, G_FILE_ATTRIBUTE_TRASH_ORIG_PATH);
 			origfile = g_file_new_for_path (origpath);
 
 			lookupvalue = g_hash_table_lookup (self->priv->trashed, origfile);
-			g_free (origpath);
 
 			if (lookupvalue) {
 				orig_trash_time = GPOINTER_TO_SIZE (lookupvalue);



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