pyfilesystem icon indicating copy to clipboard operation
pyfilesystem copied to clipboard

fsmount Doesn't call fs.close()

Open GoogleCodeExporter opened this issue 10 years ago • 2 comments

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 [email protected] on 7 Sep 2012 at 5:39

Attachments:

GoogleCodeExporter avatar Apr 11 '15 10:04 GoogleCodeExporter

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

  • Changed state: Accepted

GoogleCodeExporter avatar Apr 11 '15 10:04 GoogleCodeExporter

Is this related to Issue 130, or is the similarity entirely coincidental?

Original comment by [email protected] on 19 Sep 2012 at 12:33

GoogleCodeExporter avatar Apr 11 '15 10:04 GoogleCodeExporter