gvfs r2346 - in trunk: . daemon/trashlib
- From: alexl svn gnome org
- To: svn-commits-list gnome org
- Subject: gvfs r2346 - in trunk: . daemon/trashlib
- Date: Mon, 23 Mar 2009 10:55:40 +0000 (UTC)
Author: alexl
Date: Mon Mar 23 10:55:40 2009
New Revision: 2346
URL: http://svn.gnome.org/viewvc/gvfs?rev=2346&view=rev
Log:
2009-03-23 Alexander Larsson <alexl redhat com>
Bug 576337 â trash:/// show escaped filenames without decoding
* daemon/trashlib/trashitem.c:
(trash_item_get_trashinfo):
Unescape Path key correctly.
Modified:
trunk/ChangeLog
trunk/daemon/trashlib/trashitem.c
Modified: trunk/daemon/trashlib/trashitem.c
==============================================================================
--- trunk/daemon/trashlib/trashitem.c (original)
+++ trunk/daemon/trashlib/trashitem.c Mon Mar 23 10:55:40 2009
@@ -162,26 +162,31 @@
if (g_key_file_load_from_file (keyfile, trashinfo, 0, NULL))
{
- char *orig;
+ char *orig, *decoded;
+ decoded = NULL;
orig = g_key_file_get_string (keyfile,
"Trash Info", "Path",
NULL);
if (orig == NULL)
*original = NULL;
-
- else if (g_path_is_absolute (orig))
- *original = g_file_new_for_path (orig);
-
else
- {
- GFile *rootdir;
+ {
+ decoded = g_uri_unescape_string (orig, NULL);
- rootdir = g_file_get_parent (trashdir);
- *original = g_file_get_child (rootdir, orig);
- g_object_unref (rootdir);
- }
+ if (g_path_is_absolute (decoded))
+ *original = g_file_new_for_path (decoded);
+ else
+ {
+ GFile *rootdir;
+
+ rootdir = g_file_get_parent (trashdir);
+ *original = g_file_get_child (rootdir, decoded);
+ g_object_unref (rootdir);
+ }
+ g_free (decoded);
+ }
g_free (orig);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]