From 7f8c15ebab3a2ebe8d2929f1b3e5abb160866b57 Mon Sep 17 00:00:00 2001 From: Steve Slaven Date: Thu, 6 Aug 2009 16:31:22 -0700 Subject: Truncate files on unlink so we free their blocks diff --git a/FuseArchive/FileSystem.py b/FuseArchive/FileSystem.py index b393dbb..e70bba6 100644 --- a/FuseArchive/FileSystem.py +++ b/FuseArchive/FileSystem.py @@ -47,6 +47,10 @@ class FileSystem(fuse.Fuse): yield fuse.Direntry(e) def unlink(self, path): + # Do a truncate to free our chunks + f = ChunkFile( path, os.O_RDWR, 0 ) + f.truncate( 0 ) + f.release( 0 ) os.unlink("./tree" + path) def rmdir(self, path): -- cgit v0.10.2