Natasha15030003 / pyfilesystem

Automatically exported from code.google.com/p/pyfilesystem
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

fsmount Doesn't call fs.close() #132

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Mount a file system with fsmount.
2. Unmount the filesystem with fsmount -u
3. Check for effects of close()

What is the expected output? What do you see instead?
My filesystem has cleanup operations that should be performed when the 
filesystem is unmounted, but no cleanup occurs.

What version of the product are you using? On what operating system?
fs-0.4.0

Windows XP and Ubuntu Linux

Please provide any additional information below.

I have attached a sample filesystem to demonstrate this issue. It simply 
subclasses OSFS and adds an explicit close method.

I run 

fsmount --fs=sample_fs.MyOpener src/ mountpoint/

and the filesystem mounts at mountpoint/

When I run

fsmount -u mountpoint/

I would expect "Closed!" to be printed, but it is not. I have also tested this 
by trying to create files in specific location, in case a forked process 
printing might not appear in my console.

My filesystem creates some files that need to be cleaned up on dismount, so I 
may end up needing to reproduce much of the fsmount functionality to ensure 
cleanup occurs. I've looked into providing a patch, but it appears that this 
may require changes to both the dokan and fuse expose modules, and I got a bit 
beyond my comfort zone trying to tweak those modules.

Original issue reported on code.google.com by aus...@gmail.com on 7 Sep 2012 at 5:39

Attachments:

GoogleCodeExporter commented 8 years ago
I'm surprised that the filesystem isn't closed at some point when the fs gets 
garbage collected.

Original comment by willmcgugan on 7 Sep 2012 at 6:14

GoogleCodeExporter commented 8 years ago
Is this related to Issue 130, or is the similarity entirely coincidental?

Original comment by gc...@loowis.durge.org on 19 Sep 2012 at 12:33