From 2177ea8b15f3c0bbe5c5acb5739bd42cfb365b7a Mon Sep 17 00:00:00 2001 From: Steve Slaven Date: Thu, 23 Jul 2009 14:51:25 -0700 Subject: Added the modified flag again so that we don't _fflush on release diff --git a/fusearchive.py b/fusearchive.py index bcfed7c..ea2d99e 100755 --- a/fusearchive.py +++ b/fusearchive.py @@ -346,6 +346,7 @@ class FuseArchive(Fuse): self.rd = False self.wr = False self.size = 0 + self.modified = False # This is the current in-memory chunk and offset in to data[] self.chunk = None @@ -500,6 +501,7 @@ class FuseArchive(Fuse): index += 1 self.chunk_modified = True + self.modified = True return len(buf) # BUG: If you cp -a a file then quickly ls -l sometimes it doesn't show @@ -511,7 +513,7 @@ class FuseArchive(Fuse): self.flush() def _fflush(self): - if self.wr: + if self.wr and self.modified: dmsg( 3, "_fflush!" ) # Save our main data self._save_chunk() @@ -565,6 +567,7 @@ class FuseArchive(Fuse): print "WARNING: ftruncate is broken!!!" self.chunks = [] + self.modified = True self._load_chunk( 0 ) self._fflush() -- cgit v0.10.2