OBS User unknown 2008-05-16 21:07:45 +00:00 committed by Git OBS Bridge
parent e6534075dc
commit 70f48f0ce6
3 changed files with 50 additions and 1 deletions

View File

@ -0,0 +1,37 @@
--- gvfs-0.2.3-post/daemon/gvfsbackendtrash.c 2008-04-07 20:27:43.000000000 -0500
+++ gvfs-0.2.3-work/daemon/gvfsbackendtrash.c 2008-05-13 00:04:28.000000000 -0500
@@ -517,12 +517,33 @@ list_trash_dirs (void)
GList *topdirs_info;
struct stat statbuf;
gboolean has_trash_files;
+ int stat_result;
dirs = NULL;
has_trash_files = FALSE;
home_trash = g_build_filename (g_get_user_data_dir (), "Trash", NULL);
- if (lstat (home_trash, &statbuf) == 0 &&
+
+ /* If the home trash directory doesn't exist at this point, we must create
+ * it in order to monitor it. */
+
+ stat_result = lstat (home_trash, &statbuf);
+
+ if (stat_result != 0)
+ {
+ gchar *home_trash_files = g_build_filename (home_trash, "files", NULL);
+ gchar *home_trash_info = g_build_filename (home_trash, "info", NULL);
+
+ g_mkdir_with_parents (home_trash_files, 0700);
+ g_mkdir_with_parents (home_trash_info, 0700);
+
+ g_free (home_trash_files);
+ g_free (home_trash_info);
+
+ stat_result = lstat (home_trash, &statbuf);
+ }
+
+ if (stat_result == 0 &&
S_ISDIR (statbuf.st_mode))
{
dirs = g_list_prepend (dirs, home_trash);

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue May 13 07:38:54 CEST 2008 - hpj@suse.de
- Add gvfs-bnc382172-home-trash-monitoring.patch, which fixes
BNC #382172.
-------------------------------------------------------------------
Thu May 8 08:10:49 CEST 2008 - hpj@suse.de

View File

@ -25,7 +25,7 @@ BuildRequires: extra-rpm-macros
%endif
Summary: VFS functionality for GLib
Version: 0.2.3
Release: 13
Release: 19
License: LGPL v2.0 or later
Group: Development/Libraries/C and C++
Source0: %{name}-%{version}.tar.bz2
@ -33,6 +33,8 @@ Source0: %{name}-%{version}.tar.bz2
Patch0: gvfs-no-shebang.patch
# PATCH-FIX-UPSTREAM gvfs-bnc368628-fuse-robustness.patch bnc368628 hpj@novell.com
Patch1: gvfs-bnc368628-fuse-robustness.patch
# PATCH-FIX-UPSTREAM gvfs-bnc382172-home-trash-monitoring.patch hpj@novell.com
Patch2: gvfs-bnc382172-home-trash-monitoring.patch
Url: http://www.gnome.org
BuildRoot: %{_tmppath}/%{name}-%{version}-build
AutoReqProv: on
@ -120,6 +122,7 @@ Authors:
%setup -n %{name}-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
@ -174,6 +177,9 @@ chmod -x $RPM_BUILD_ROOT/%{_sysconfdir}/profile.d/*
%files lang -f %{name}.lang
%changelog
* Tue May 13 2008 hpj@suse.de
- Add gvfs-bnc382172-home-trash-monitoring.patch, which fixes
BNC #382172.
* Thu May 08 2008 hpj@suse.de
- Add gvfs-bnc368628-fuse-robustness.patch, which probably fixes
BNC #368628.