Package: gnome-vfs / 1:2.24.4-6

07_trash_location.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Index: gnome-vfs-2.24.2/modules/file-method.c
===================================================================
--- gnome-vfs-2.24.2.orig/modules/file-method.c	2009-05-25 10:37:05.000000000 +0200
+++ gnome-vfs-2.24.2/modules/file-method.c	2010-02-06 11:55:46.645282580 +0100
@@ -1391,11 +1391,11 @@
 	char *per_user_part; 
 	char *retval;
 	
-	per_user_part = g_strconcat (TRASH_DIRECTORY_NAME_BASE "-", 
-			             g_get_user_name (), 
-				     NULL);
+	per_user_part = g_strdup_printf ("%s-%lu",
+					 TRASH_DIRECTORY_NAME_BASE,
+					 (unsigned long) geteuid());
 
-	retval = g_build_filename (path, per_user_part, NULL);
+	retval = g_build_filename (path, per_user_part, "files", NULL);
 	
 	g_free (per_user_part);
 
@@ -1994,7 +1994,7 @@
 			}
 		} else  {
 			/* volume with a home directory, just create a trash in home */
-			target_directory_path = append_to_path (home_directory, TRASH_DIRECTORY_NAME_BASE);
+			target_directory_path = g_build_filename (g_get_user_data_dir (), "Trash", "files", NULL);
 		}
 		break;