summaryrefslogtreecommitdiff
path: root/daemon/gvfsbackendtrash.c
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2012-07-12 00:26:24 +0100
committerBastien Nocera <hadess@hadess.net>2012-07-13 20:30:37 +0100
commit89d6253b08ae993dd23004c8c8f7f9ac4b7d1a2e (patch)
tree8aa3dece6eeefd062b9940bec17fa8d825e0a6a9 /daemon/gvfsbackendtrash.c
parenta5507e2e5cffd56926208364f8c7065f19eb4e26 (diff)
downloadgvfs-89d6253b08ae993dd23004c8c8f7f9ac4b7d1a2e.tar.gz
trash: Make it possible to get to real URI
So that the files can be poked direction, without the indirection. This makes it possible for Totem to play DVDs from the trash for example. https://bugzilla.gnome.org/show_bug.cgi?id=667794
Diffstat (limited to 'daemon/gvfsbackendtrash.c')
-rw-r--r--daemon/gvfsbackendtrash.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/daemon/gvfsbackendtrash.c b/daemon/gvfsbackendtrash.c
index e515fb80..60fb3c2a 100644
--- a/daemon/gvfsbackendtrash.c
+++ b/daemon/gvfsbackendtrash.c
@@ -485,7 +485,7 @@ trash_backend_add_info (TrashItem *item,
if (is_toplevel)
{
const gchar *delete_date;
- GFile *original;
+ GFile *original, *real;
g_assert (item != NULL);
@@ -506,6 +506,19 @@ trash_backend_add_info (TrashItem *item,
g_free (path);
}
+ real = trash_item_get_file (item);
+
+ if (real)
+ {
+ char *uri;
+
+ uri = g_file_get_uri (real);
+ g_file_info_set_attribute_string (info,
+ G_FILE_ATTRIBUTE_STANDARD_TARGET_URI,
+ uri);
+ g_free (uri);
+ }
+
delete_date = trash_item_get_delete_date (item);
if (delete_date)