aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xfusearchive.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/fusearchive.py b/fusearchive.py
index 316ff21..2d1f390 100755
--- a/fusearchive.py
+++ b/fusearchive.py
@@ -278,7 +278,7 @@ class FuseArchive(Fuse):
self.modified = False
# This is the current in-memory chunk and offset in to data[]
- self.chunk = None
+ self.chunk = ''
self.chunk_index = 0
self.chunk_modified = False
self.chunk_size = magic_blocksize
@@ -327,6 +327,12 @@ class FuseArchive(Fuse):
dmsg( 3, str(self) + " init complete" )
def _load_chunk( self, index ):
+ # If the current chunk is the same as the chunk we're loading
+ # just return
+ if index == self.chunk_index:
+ dmsg( 3, "Load chunk is same as current chunk, all done" )
+ return
+
# Save this chunk if modified
self._save_chunk()