[PATCH] Re: extfs cleanup



On Fri, Dec 06, 2002 at 01:11:40AM -0500, Pavel Roskin wrote:
> I believe the reason is because extfs_open() issues "copyout" even when
> the file is opened with O_TRUNC.  This should be easy to fix.  I'm have 
> added a FIXME to the source.

Fixed. Patch attached. 

-- 

  _.|._ |_  _.    : Adam Byrtek, alpha@(irc.pl|debian.org)
 (_|||_)| |(_|    : gg 1802819, pgp 0xB25952C0
     |            : jid alpha.jabberpl.org
Index: extfs.c
===================================================================
RCS file: /cvs/gnome/mc/vfs/extfs.c,v
retrieving revision 1.62
diff -u -r1.62 extfs.c
--- extfs.c	6 Dec 2002 14:44:51 -0000	1.62
+++ extfs.c	7 Dec 2002 02:05:54 -0000
@@ -658,13 +658,14 @@
 	    return NULL;
 	close (local_handle);
 
-	if (extfs_cmd (" copyout ", archive, entry, local_filename)
-	    && !created) {
-	    unlink (local_filename);
-	    free (local_filename);
-	    my_errno = EIO;
-	    return NULL;
-	}
+        if (!(flags & O_CREAT))
+ 	    if (extfs_cmd (" copyout ", archive, entry, local_filename)
+	        && !created) {
+	        unlink (local_filename);
+	        free (local_filename);
+	        my_errno = EIO;
+	        return NULL;
+	    }
 	entry->inode->local_filename = local_filename;
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]