rpms/gvfs/F-10 gvfs-1.0.4-fuse-truncate-immediately.patch, NONE, 1.1 gvfs.spec, 1.96, 1.97

Tomas Bzatek tbzatek at fedoraproject.org
Mon Mar 2 14:46:18 UTC 2009


Author: tbzatek

Update of /cvs/extras/rpms/gvfs/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv27598

Modified Files:
	gvfs.spec 
Added Files:
	gvfs-1.0.4-fuse-truncate-immediately.patch 
Log Message:
* Mon Mar  2 2009 Tomas Bzatek <tbzatek at redhat.com> - 1.0.3-6
- FUSE: truncate files immediately (#479199)


gvfs-1.0.4-fuse-truncate-immediately.patch:

--- NEW FILE gvfs-1.0.4-fuse-truncate-immediately.patch ---
Index: client/gvfsfusedaemon.c
===================================================================
--- client/gvfsfusedaemon.c	(revision 2250)
+++ client/gvfsfusedaemon.c	(working copy)
@@ -1773,6 +1773,16 @@ vfs_ftruncate (const gchar *path, off_t
                   fh->stream = NULL;
 
                   fh->stream = g_file_replace (file, 0, FALSE, 0, NULL, &error);
+
+                  if (fh->stream != NULL)
+                    {
+                      /* The stream created by g_file_replace() won't always replace
+                       * the file until it's been closed. So close it now to make
+                       * future operations consistent. */
+                      g_output_stream_close (fh->stream, NULL, NULL);
+                      g_object_unref (fh->stream);
+                      fh->stream = NULL;
+                    }
                 }
               else
                 {


Index: gvfs.spec
===================================================================
RCS file: /cvs/extras/rpms/gvfs/F-10/gvfs.spec,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -r1.96 -r1.97
--- gvfs.spec	28 Jan 2009 13:01:04 -0000	1.96
+++ gvfs.spec	2 Mar 2009 14:45:48 -0000	1.97
@@ -1,7 +1,7 @@
 Summary: Backends for the gio framework in GLib
 Name: gvfs
 Version: 1.0.3
-Release: 5%{?dist}
+Release: 6%{?dist}
 License: LGPLv2+
 Group: System Environment/Libraries
 URL: http://www.gtk.org
@@ -52,6 +52,11 @@
 # http://bugzilla.gnome.org/show_bug.cgi?id=519071
 Patch10: obex-write-v3.patch
 
+# https://bugzilla.redhat.com/show_bug.cgi?id=479199
+# Immediately close the stream we get from g_file_replace(), so truncation becomes visible.
+Patch11: gvfs-1.0.4-fuse-truncate-immediately.patch
+
+
 %description
 The gvfs package provides backend implementations for the gio 
 framework in GLib. It includes ftp, sftp, cifs. 
@@ -142,6 +147,8 @@
 pushd daemon/
 %patch10 -p0 -b .obexftp-write
 popd
+%patch11 -p0 -b .fuse-trunc
+
 
 %build
 
@@ -279,6 +286,9 @@
 
 
 %changelog
+* Mon Mar  2 2009 Tomas Bzatek <tbzatek at redhat.com> - 1.0.3-6
+- FUSE: truncate files immediately (#479199)
+
 * Wed Jan 28 2009 - Bastien Nocera <bnocera at redhat.com> - 1.0.3-5
 - Add ObexFTP write support
 




More information about the fedora-extras-commits mailing list