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

Error: canonicalizing path #1113

Closed shujaat-github closed 1 year ago

shujaat-github commented 1 year ago

Environment

Check List

Description

When using Mirror sample I get warning & error while creating and compiling a rust-lang hello world application in the DOKAN mounted drive (in my case drive letter is U).

When I use any other normal drive I don't get such warning and error.

I have Rust V1.63.0, using Visual Studio Code V1.71.2 on Windows 11, and I use rust-analyzer extension for VS Code if that can help in Debugging.

Warning

warning: could not canonicalize path: 'U:\'

image

Error

error canonicalizing path `U:\sample_project\target\debug\incremental\sample_project-a5l8xa3t1bei`: The system cannot find the file specified. (os error 2)

image

shujaat-github commented 1 year ago

Apart from Rust issue , both Dokany and EncFSy has been tested to work flawlessly as it can be seen in this report.

Liryna commented 1 year ago

Hi @shujaat-github , can you share the command line you used to run the mirror ? Have you tried with the option /o ?

shujaat-github commented 1 year ago

Hi @Liryna, with /o option no warning or error is shown and the project compiles and runs perfectly. Previously I used this command line to run the mirror:

mirror.exe /r C:\Dokany_Mirror_Test /l U

Now I use this command line to run the mirror:

mirror.exe /r C:\Dokany_Mirror_Test /l U /o

image

Although mirror works perfectly with the option /o but I don't want the Recycle Bin feature as in case of EncFSy some confidential data may end up in the recycle bin. Is it possible to turn off Recycle Bin feature even when using /o option?

shujaat-github commented 1 year ago

@Liryna I may be wrong about security issues if I enable mount manager using /o option. I would love to hear some comments in this regard from you.

I wonder why mirror doesn't work properly when we don't use /o option. It would have been nice if mirror worked without this option.

Liryna commented 1 year ago

I might be wrong but this can be configured per drive in the recycle bin setting. There might be a way to do it programmatically? FYI the recycle bin is in the virtual drive. If encFSy encrypt this part, it should be fine.

Otherwise a better option is to make encFSy to detect the move to recycle bin and directly delete the files instead and return a file not found error.

I also think it could just deny to create the recycle bin hierarchy in the virtual drive which should make the system inform it is a permanent delete instead of move?

shujaat-github commented 1 year ago

@Liryna Can you please see if it is possible to fix the canonicalizing path issue without the /o option ?

@Liryna I appreciate the suggestions you provided. I will definitely check them out.

Apart from this issue, I would greatly appreciate your time if you would please look at this issue as well.

Liryna commented 1 year ago

This is unfortunately not possible. The option register the drive to the mount manager and the API that was failing use the mount manager database to gather the drive information.

shujaat-github commented 1 year ago

This is unfortunately not possible. The option register the drive to the mount manager and the API that was failing use the mount manager database to gather the drive information.

This concludes the issue very well. I'm much thankful for your time.

Liryna commented 1 year ago

Glad I was able to help you!