dokan-dotnet: DokanNetMirror does not return "." (self) and ".." (parent) directories in `FindFiles`

TL;DR;

I launch DotNetMirror to mirror Original into Mirror folder. It shows in Explorer as a mount, I can open it.

Launch a 3rd party game with its data path set to a subfolder of Mirror folder.

By the time the game finishes loading, the mount disappears together with the NTFS directory where it was mounted to. Later game as part of its functioning recreates the directory as a regular NTFS directory (I suspect it just sees mount point gone).

A potential clue from the game is

22.750 Warning FileUtil.cpp:447: Permission denied trying to remove C:\Users\lost\Projects\Borg\Debug\DummySaves\Factorio\temp...lock. Will set write permissions and try again 22.844 Error FileUtil.cpp:469: Couldn’t remove C:\Users\lost\Projects\Borg\Debug\DummySaves\Factorio\temp...lock: The process cannot access the file because it is being used by another process.

Repro steps

  1. Download and install Factorio Demo. Full game should also work.
  2. Create a directory Original anywhere on existing NTFS volume.
  3. Copy this file to Original: config.txt
  4. Rename it to config.ini
  5. Edit the file and change write-data= to point to the full path to Mirror\UserData (might need to precreate Original\UserData)
  6. Launch DokanNetMirror to mirror Original into Mirror (I did NOT use unsafe)
  7. Check that Mirror has config.ini with write-data= pointing to C:\Path\To\Mirror\UserData
  8. Launch factorio.exe --config C:\Path\To\Mirror\config.ini
  9. Wait and watch the contents of Mirror directory

What happens

As mentioned above, at some point the mount just disappears, and the only clue is the error from the game console output.

The game will shortly recreate it as a regular directory, but the Original will no longer be updated.

DokanNetMirror continues to work at this point, and no errors are displayed. Actually, there are no more logs from it from this point on. The log just stops until I Ctrl+C it at which point it prints Success and quits as if everything is OK.

This one is from DokanNetMirror when I do above steps (instead of UserData I use Factorio but that should not matter): mirror.log

About this issue

  • Original URL
  • State: closed
  • Created 9 months ago
  • Comments: 20 (20 by maintainers)

Commits related to this issue

Most upvoted comments

Awesome, Thanks for the confirmation! 🏆 I believe this can be closed now and waiting for a next release. Let me know otherwise