aboutsummaryrefslogtreecommitdiffstats
path: root/FuseArchive
diff options
context:
space:
mode:
authorSteve Slaven <bpk@hoopajoo.net>2009-08-04 05:07:16 (GMT)
committerSteve Slaven <bpk@hoopajoo.net>2009-08-04 05:07:16 (GMT)
commit3751c39fe8ae6abf161dd18924e0cc733bf5800f (patch)
tree5b636e5c3ab767a99cf942a1c956f79565627f8c /FuseArchive
parentb2e8b961325b9813656aef54880f09f3bce9becf (diff)
downloadfusearchive-3751c39fe8ae6abf161dd18924e0cc733bf5800f.zip
fusearchive-3751c39fe8ae6abf161dd18924e0cc733bf5800f.tar.gz
fusearchive-3751c39fe8ae6abf161dd18924e0cc733bf5800f.tar.bz2
Added storage switch back in
Diffstat (limited to 'FuseArchive')
-rw-r--r--FuseArchive/ChunkFile.py11
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):