gvfs r2187 - in trunk: . daemon/trashlib
- From: ryanl svn gnome org
- To: svn-commits-list gnome org
- Subject: gvfs r2187 - in trunk: . daemon/trashlib
- Date: Fri, 30 Jan 2009 21:19:36 +0000 (UTC)
Author: ryanl
Date: Fri Jan 30 21:19:36 2009
New Revision: 2187
URL: http://svn.gnome.org/viewvc/gvfs?rev=2187&view=rev
Log:
2009-01-28 Ryan Lortie <desrt desrt ca>
Bug 512144 â symlinks to folders are deleted recursively
* desrt: place a paper bag over my face
* daemon/trashlib/trashexpunge.c: try a lot harder to not follow
symlinks.
Modified:
trunk/ChangeLog
trunk/daemon/trashlib/trashexpunge.c
Modified: trunk/daemon/trashlib/trashexpunge.c
==============================================================================
--- trunk/daemon/trashlib/trashexpunge.c (original)
+++ trunk/daemon/trashlib/trashexpunge.c Fri Jan 30 21:19:36 2009
@@ -25,7 +25,8 @@
NULL, NULL);
enumerator = g_file_enumerate_children (directory,
- G_FILE_ATTRIBUTE_STANDARD_NAME,
+ G_FILE_ATTRIBUTE_STANDARD_NAME ","
+ G_FILE_ATTRIBUTE_STANDARD_TYPE,
G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
NULL, NULL);
@@ -40,7 +41,9 @@
basename = g_file_info_get_name (info);
sub = g_file_get_child (directory, basename);
- trash_expunge_delete_everything_under (sub);
+
+ if (g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY)
+ trash_expunge_delete_everything_under (sub);
/* do the delete here */
g_file_delete (sub, NULL, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]