dokan-dev / dokany

User mode file system library for windows with FUSE Wrapper
http://dokan-dev.github.io
5.2k stars 661 forks source link

mirror has strange behavior #756

Closed arnaudcarre closed 5 years ago

arnaudcarre commented 5 years ago

Environment

Description

I tried the mirror.exe using that kind of command: mirror.exe /r D:\temp /l m

a new virtual disk m: is created but first of all, the disk size does not reflect the real d:\temp folder size. ( m: is seen as a 1GiB disk, with 512MiB used. Real d:\temp is 300MiB folder, located on a 1 TiB d: disk). Is it normal?

then, I created a file in m:, then deleted it from d:\temp, and windows explorer does not "refresh" the window ( the file is still displayed in the m: windows explorer, until I press F5 to refresh)

finally, I tried to run an application file from m: and I get weird error. ( the exact same application is running fine if I run it from d:\temp ). Is there some known issues when executing an application?

( error is that the application uses a side DLL, let's call it "app.dll". the error messagein the dialog box is "the code execution cannot proceed because M:\H@,$.DLL was not found" ( the DLL name is badly displayed in the message box, as the mirror driver missed something)

Any idea of those issues? thanks in advance Arnaud

Liryna commented 5 years ago

Hi @arnaudcarre ,

Mirror is using the default value for device space. You can personalize it with GetDiskFreeSpace See https://github.com/dokan-dev/dokany/blob/master/samples/dokan_mirror/mirror.c#L1370 Do not hesitate to look at the doc here https://dokan-dev.github.io/dokany-doc/html/

About delete in D and M refresh. Both devices are not linked. Dokan is not notified for changes made of an outside software on the source. Keep in mind that Dokan FS can be whatever. Mirror is just a sample.

For the error, can you try with /o option ? https://github.com/dokan-dev/dokany/blob/master/samples/dokan_mirror/mirror.c#L1573

Liryna commented 5 years ago

Hi @arnaudcarre ,

Please update to the latest dokan version and if you find any strange behavior do not hesitate to give feedback.

JxLiu2016 commented 3 years ago

Hi @Liryna , I tried Mirror with /o option, but the "delete in D and M refresh" still exist. How to solve this issue, do you have any idea? For example, it is the kernel drive should be changed, or some other modifications?

Liryna commented 3 years ago

You need to change the mirror code to listen for directory changes in D drive to get events like the delete event and notify the change in M by using DokanNotify* api available in the dokan library.