aboutsummaryrefslogtreecommitdiffstats
path: root/FuseArchive
diff options
context:
space:
mode:
authorSteve Slaven <bpk@hoopajoo.net>2009-11-02 23:59:19 (GMT)
committerSteve Slaven <bpk@hoopajoo.net>2009-11-02 23:59:19 (GMT)
commit68af6dc389055d590ba7746aea283b4e36ee68d0 (patch)
treeaafdee5005d9927179f424c04107849809e63d46 /FuseArchive
parent5ffcb57273d6476868397d215567eca6e48f9963 (diff)
downloadfusearchive-68af6dc389055d590ba7746aea283b4e36ee68d0.zip
fusearchive-68af6dc389055d590ba7746aea283b4e36ee68d0.tar.gz
fusearchive-68af6dc389055d590ba7746aea283b4e36ee68d0.tar.bz2
Handle truncate
Diffstat (limited to 'FuseArchive')
-rw-r--r--FuseArchive/ChunkBuffer.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/FuseArchive/ChunkBuffer.py b/FuseArchive/ChunkBuffer.py
index 7b6beee..89d468e 100644
--- a/FuseArchive/ChunkBuffer.py
+++ b/FuseArchive/ChunkBuffer.py
@@ -27,6 +27,10 @@ class ChunkBuffer:
return l
+ def truncate( self, l ):
+ s = ''.join( self.chunk )
+ self.chunk = [ s[ :l ] ]
+
def _simplify( self ):
logging.debug( "Simplify!" )
self.chunk = [ ''.join( self.chunk ) ]