Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drive Letter 'A' not usable as mount point #709

Closed
5 tasks done
infeo opened this issue Jun 28, 2018 · 4 comments
Closed
5 tasks done

Drive Letter 'A' not usable as mount point #709

infeo opened this issue Jun 28, 2018 · 4 comments

Comments

@infeo
Copy link
Member

infeo commented Jun 28, 2018

Feature request can skip this form. Bug report must complete it. Check List must be 100% match or it will be automatically closed without further discussion. Please remove this line.

Environment

  • Windows version: Windows 10 Pro
  • Processor architecture: x64
  • Dokany version: 1.1.0.2000
  • Library type (Dokany/FUSE): Dokany

Check List

  • I checked my issue doesn't exist yet
  • My issue is valid with mirror default sample and not specific to my user-mode driver implementation
  • I can always reproduce the issue with the provided description below.
  • I have updated Dokany to the latest version and have reboot my computer after.
  • I tested one of the last snapshot from appveyor CI

Description

Don't know if it is a bug or not, but with dokany you cannot use the drive letter 'A' as a mount point. You can find this exclusion in the code:

dokany/dokan/dokan.c

Lines 100 to 102 in 224fc08

BOOL IsValidDriveLetter(WCHAR DriveLetter) {
return (L'b' <= DriveLetter && DriveLetter <= L'z') ||
(L'B' <= DriveLetter && DriveLetter <= L'Z');

My question is now, why is this drive letter excluded? I can't see any reason for this. (I know the drive letters 'A' and 'B' are a little special, see https://superuser.com/questions/231273/what-are-the-windows-a-and-b-drives-used-for#233284).

Best wishes,
infeo

Logs

--omitted--

@Liryna
Copy link
Member

Liryna commented Jun 28, 2018

Hi @infeo ,

Driver letter A is windows reserved letter for historical floppy disk driver 👍 as you seen on the superuser questions.
The code is just to avoid to get an error from windows later.

@infeo
Copy link
Member Author

infeo commented Jun 28, 2018

That's true, but then 'B' should be also excluded, shouldn't it? Or do i miss something? (With mount point 'B' the mirror example works pretty fine).

Additionally, if you change the code to accept 'A' as a valid mount point, compile and install it, the mirror example runs pretty smooth. Maybe this constraint can be dropped in the next release? :D

@Liryna
Copy link
Member

Liryna commented Jul 3, 2018

Hi @infeo ,

I see your point 👍 I see no issue remove this if on Windows 7 (lower supported OS) mount with and without mount manager work for A & B.
This code comes from the original dokan code that supported XP.

@Liryna
Copy link
Member

Liryna commented Jul 8, 2018

Hi @infeo ,

Windows 7 propose the usage and the mount of a driver with the letter A. I have changed the condition to allow A also therefore 👍 af8ddfc

Thank you for your feedback !

@Liryna Liryna closed this as completed Jul 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants