aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Slaven <bpk@hoopajoo.net>2009-07-23 21:51:25 (GMT)
committerSteve Slaven <bpk@hoopajoo.net>2009-07-23 21:51:25 (GMT)
commit2177ea8b15f3c0bbe5c5acb5739bd42cfb365b7a (patch)
tree039210f7f97c8ecef1a88f1a11e454900bc80e9e
parentc5ac8d9dfddf293db4987fd0f06068dec369f2d0 (diff)
downloadfusearchive-2177ea8b15f3c0bbe5c5acb5739bd42cfb365b7a.zip
fusearchive-2177ea8b15f3c0bbe5c5acb5739bd42cfb365b7a.tar.gz
fusearchive-2177ea8b15f3c0bbe5c5acb5739bd42cfb365b7a.tar.bz2
Added the modified flag again so that we don't _fflush on release
-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()