dokan-dev / dokany

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

Kernel - Fix subfolder property when using mount manager #1053

Closed ATRiiX closed 2 years ago

ATRiiX commented 2 years ago

Fixes #355 . Compared with opening the properties of windows local drive's sub-directories, I found the IOCTL_MOUNTDEV_QUERY_DEVICE_NAME return STATUS_INVALID_PARAMETER, while the dokan mirror drive's sub-dir return SUCCESS.

Checklist

Changes proposed in this pull request:

Liryna commented 2 years ago

@ATRiiX Hi @ATRiiX,

Thanks for the PR!

Now that I read a little more the code, I believe the DiskDeviceControl should not include the MOUNTDEVCONTROLTYPE ioctl at all and have its own function that does the IsVolumeOpen check . Like actually implement the switch case here with the two functions and remove the IsVolumeOpen comment https://github.com/dokan-dev/dokany/blob/3f7227cb7ba25c7caf78610daabd0e0376098745/sys/device.c#L739-L769

ATRiiX commented 2 years ago

Hi @Liryna , thanks for the reply. I have update the pr with your suggestions. Now add IsVolumeOpen check when the code MOUNTDEVCONTROLTYPE, and test it can also fix the properties issue. Please take some time to review the pr.

Liryna commented 2 years ago

Thanks @ATRiiX for the quick change! I added some small comments and I believe we are good to merge it 😎

Liryna commented 2 years ago

Thanks again for your contribution @ATRiiX 🏆 very appreciated!