diff options
-rw-r--r-- | FuseArchive/ChunkFile.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/FuseArchive/ChunkFile.py b/FuseArchive/ChunkFile.py index 3b04ba8..051965f 100644 --- a/FuseArchive/ChunkFile.py +++ b/FuseArchive/ChunkFile.py @@ -7,7 +7,6 @@ from FuseArchive.Serializer import Serializer magic_blocksize = 1024 * 128 # Use a tiny block size to debug writes, so you can use a smaller test file #magic_blocksize = 1024 -magic_depth = 5 chunkstyle = 'fs' # Memory for dirty blocks, per file (1M) @@ -32,8 +31,14 @@ def flag2mode(flags): return m -load_chunk = FuseArchive.Storage.FileSystem.load_chunk -save_chunk = FuseArchive.Storage.FileSystem.save_chunk +if chunkstyle == 'fs': + load_chunk = FuseArchive.Storage.FileSystem.load_chunk + save_chunk = FuseArchive.Storage.FileSystem.save_chunk +elif chunkstyle == 'zip': + load_chunk = FuseArchive.Storage.ZipFile.load_chunk + save_chunk = FuseArchive.Storage.ZipFile.save_chunk +else: + raise ValueException( 'Invalid chunk style' ) class FuseArchiveStat(fuse.Stat): def __init__(self, stat): |