aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--FuseArchive/FileSystem.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/FuseArchive/FileSystem.py b/FuseArchive/FileSystem.py
index dfb5515..0d38f7b 100644
--- a/FuseArchive/FileSystem.py
+++ b/FuseArchive/FileSystem.py
@@ -47,10 +47,12 @@ class FileSystem(fuse.Fuse):
yield fuse.Direntry(e)
def unlink(self, path):
- # Ask our file to release it's chunks
- f = ChunkFile( path, os.O_RDWR, 0 )
- f.pre_unlink()
- f.release( 0 )
+ if os.path.isfile( path ) and not os.path.islink( path ):
+ # Ask our file to release it's chunks
+ f = ChunkFile( path, os.O_RDWR, 0 )
+ f.pre_unlink()
+ f.release( 0 )
+
os.unlink("./tree" + path)
def rmdir(self, path):