From 70f48f0ce6af8ee79330b38f5f0eee3db18c14a02dcaffc855aec95453debe13 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 16 May 2008 21:07:45 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gvfs?expand=0&rev=16 --- gvfs-bnc382172-home-trash-monitoring.patch | 37 ++++++++++++++++++++++ gvfs.changes | 6 ++++ gvfs.spec | 8 ++++- 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 gvfs-bnc382172-home-trash-monitoring.patch diff --git a/gvfs-bnc382172-home-trash-monitoring.patch b/gvfs-bnc382172-home-trash-monitoring.patch new file mode 100644 index 0000000..f068498 --- /dev/null +++ b/gvfs-bnc382172-home-trash-monitoring.patch @@ -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); diff --git a/gvfs.changes b/gvfs.changes index 7273383..0bf801f 100644 --- a/gvfs.changes +++ b/gvfs.changes @@ -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 diff --git a/gvfs.spec b/gvfs.spec index 9987138..83c4e7a 100644 --- a/gvfs.spec +++ b/gvfs.spec @@ -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.