[nautilus] Do not set an activation URI for files in Trash



commit bc22321e5b5b02711b65d8c1b0301a53de42f18b
Author: Stefano Facchini <stefano facchini gmail com>
Date:   Tue Jul 23 15:31:27 2013 +0200

    Do not set an activation URI for files in Trash
    
    https://bugzilla.gnome.org/show_bug.cgi?id=689248

 libnautilus-private/nautilus-file.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/libnautilus-private/nautilus-file.c b/libnautilus-private/nautilus-file.c
index 416c79d..d94d8b2 100644
--- a/libnautilus-private/nautilus-file.c
+++ b/libnautilus-private/nautilus-file.c
@@ -2178,7 +2178,8 @@ update_info_internal (NautilusFile *file,
        }
        file->details->type = file_type;
 
-       if (!file->details->got_custom_activation_uri) {
+       if (!file->details->got_custom_activation_uri &&
+           !nautilus_file_is_in_trash (file)) {
                activation_uri = g_file_info_get_attribute_string (info, 
G_FILE_ATTRIBUTE_STANDARD_TARGET_URI);
                if (activation_uri == NULL) {
                        if (file->details->activation_uri) {
@@ -2189,7 +2190,7 @@ update_info_internal (NautilusFile *file,
                } else {
                        old_activation_uri = file->details->activation_uri;
                        file->details->activation_uri = g_strdup (activation_uri);
-                       
+
                        if (old_activation_uri) {
                                if (strcmp (old_activation_uri,
                                            file->details->activation_uri) != 0) {


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