diff options
author | Steve Slaven <bpk@hoopajoo.net> | 2009-08-06 23:31:22 (GMT) |
---|---|---|
committer | Steve Slaven <bpk@hoopajoo.net> | 2009-08-06 23:31:22 (GMT) |
commit | 7f8c15ebab3a2ebe8d2929f1b3e5abb160866b57 (patch) | |
tree | f774481edac5bbba7e25b3237799402c0bba2599 | |
parent | e3f46ccfb21bb988e2649a6c54daba9dec2c9a03 (diff) | |
download | fusearchive-7f8c15ebab3a2ebe8d2929f1b3e5abb160866b57.zip fusearchive-7f8c15ebab3a2ebe8d2929f1b3e5abb160866b57.tar.gz fusearchive-7f8c15ebab3a2ebe8d2929f1b3e5abb160866b57.tar.bz2 |
Truncate files on unlink so we free their blocks
-rw-r--r-- | FuseArchive/FileSystem.py | 4 |
1 files changed, 4 insertions, 0 deletions
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): |