GetDriveType and empty CD/DVD-ROM drives

GOUJON Alexandre ale.goujon at
Sat Jul 14 13:18:18 CDT 2012


I'm currently working on bug #17037.
The root cause is that GetDriveType("D:\") (if D is mapped to 
/dev/cdrom) returns DRIVE_NO_ROOT_DIR while on Windows it returns 
DRIVE_CDROM when there is no disc in the D drive.

GetDriveType tries to open D:\ which is converted into \\??\\D:\\ then 
The fact is that there is a dosdevices/d:: file (symlinked to 
/dev/cdrom) but no dosdevices/d: except if a CD or DVD is in and mounted 

The conversion \\??\\D:\\ -> ~/.wine/dosdevices/d:/ is done in 
wine_nt_to_unix_file_name (ntdll/directory.c, line 2897).
I'm asking here because I wonder if modifying wine_nt_to_unix_file_name 
is the right thing to do and sane: it's called at several locations and 
I don't want to cause trouble and regressions, well, if possible.

Thanks for any advice

More information about the wine-devel mailing list