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
- Download and install Factorio Demo. Full game should also work.
- Create a directory
Original
anywhere on existing NTFS volume. - Copy this file to
Original
: config.txt - Rename it to
config.ini
- Edit the file and change
write-data=
to point to the full path toMirror\UserData
(might need to precreateOriginal\UserData
) - Launch
DokanNetMirror
to mirrorOriginal
intoMirror
(I did NOT useunsafe
) - Check that
Mirror
hasconfig.ini
withwrite-data=
pointing toC:\Path\To\Mirror\UserData
- Launch
factorio.exe --config C:\Path\To\Mirror\config.ini
- 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)
Awesome, Thanks for the confirmation! 🏆 I believe this can be closed now and waiting for a next release. Let me know otherwise