aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xfusearchive.py5
1 files changed, 4 insertions, 1 deletions
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()