From 68af6dc389055d590ba7746aea283b4e36ee68d0 Mon Sep 17 00:00:00 2001 From: Steve Slaven Date: Mon, 2 Nov 2009 15:59:19 -0800 Subject: Handle truncate 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 ) ] -- cgit v0.10.2