Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeleteFile method will not be called in dokan when using in Win8 #159

Closed
GoogleCodeExporter opened this issue Apr 11, 2015 · 1 comment
Closed

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Mount a file system in Win8
2. Delete a file on the virtual drive 
3. The file will appear again after refreshing the Windows Explorer

What is the expected output? What do you see instead?

Expected: Delete the file
Instead: The file appears again after refreshing.

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

fs 0.4.1 (the current trunk), dokan 0.6.0, Windows 8

Please provide any additional information below.

Actually, this seems to be a dokan bug 
(https://code.google.com/p/dokan/issues/detail?id=269).
As stated by news.ivo@gmail.com, Win8 does not call DokanSetInformation at all.
Instead, Win8 set the FILE_DELETE_ON_CLOSE flag when calling CreateFile and 
close it immediately.

But since dokan has not been maintained for a long period of time, I suggest 
that pyFilesystem fixes this issue independently.
In the simplest implementation, 
One can check whether the FILE_DELETE_ON_CLOSE flag is set in CreateFile 
(fs.expose.dokan.__init__.py), and record these information in a set.
Then in the Cleanup function, add a corresponding or clause after the checking 
of info.contents.DeleteOnClose.
This method works fine for me.

Original issue reported on code.google.com by james0...@gmail.com on 21 Aug 2013 at 8:39

@lurch
Copy link
Contributor

lurch commented Aug 1, 2016

Closing, as I'm assuming this is fixed in newer versions of Dokan, which #256 is adding support for.

@lurch lurch closed this as completed Aug 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants