aboutsummaryrefslogtreecommitdiffstats
path: root/fusearchive.py
diff options
context:
space:
mode:
Diffstat (limited to 'fusearchive.py')
-rwxr-xr-xfusearchive.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/fusearchive.py b/fusearchive.py
index ba50084..1c8cfb6 100755
--- a/fusearchive.py
+++ b/fusearchive.py
@@ -289,6 +289,7 @@ class FuseArchiveSerializer:
f = gzip.GzipFile( None, "wb", gzip_compress_level, fh )
#f = fh
cPickle.dump( obj, f )
+ del f
fh.flush()
@staticmethod
@@ -503,8 +504,9 @@ class FuseArchive(Fuse):
# files works (in the create a read-only file for writing case)
src = "./tree" + path
logging.debug( "Saving fh for " + src )
- self.file = os.fdopen( os.open( src, flags, *mode ),
- flag2mode( flags ) )
+ nflags = os.O_RDWR
+ self.file = os.fdopen( os.open( src, nflags, *mode ),
+ flag2mode( nflags ) )
if preexist:
# Read in file info table
@@ -517,7 +519,7 @@ class FuseArchive(Fuse):
self.chunks = magic[ 'chunks' ]
self.chunk_size = magic[ 'chunk_size' ]
except Exception, e:
- logging.critical( e )
+ logging.critical( self.orig_path + ": " + str( e ) )
else:
if self.wr:
logging.debug( "File doesn't exist and we're going to write, creating temp empty file" )
@@ -567,6 +569,8 @@ class FuseArchive(Fuse):
# This simply puts the chunk data inside our current chunks at chunk_index
def _save_chunk(self):
if self.chunk_modified:
+ logging.debug( "Saving chunk " + str(self.chunk_index) )
+
# Make sure we have room for this chunk
size = len( self.chunks )
if self.chunk_index >= size:
@@ -753,7 +757,7 @@ class FuseArchive(Fuse):
} )
-
+ logging.debug( "_fflush exit" )
return 1