[gvfs] trash: Make it possible to get to real URI
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] trash: Make it possible to get to real URI
- Date: Fri, 13 Jul 2012 19:30:49 +0000 (UTC)
commit 89d6253b08ae993dd23004c8c8f7f9ac4b7d1a2e
Author: Bastien Nocera <hadess hadess net>
Date: Thu Jul 12 00:26:24 2012 +0100
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
daemon/gvfsbackendtrash.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/daemon/gvfsbackendtrash.c b/daemon/gvfsbackendtrash.c
index e515fb8..60fb3c2 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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]