Patch to fix bug 17619 - GetDriveTypeW reporting C: as a network share if /home is an NFS share
lordhavoc at ghdigital.com
Mon Mar 9 23:24:45 CDT 2009
Ben Klein wrote:
> You're wrong there, it's DRIVE_UNKNOWN, which is the autodetect thing
> (I haven't looked into it in detail, but something is *correctly*
> autodetecting your drive C: as a network drive).
> I'm still pretty sure kernel32 isn't the right place for forcing drive
> type. Maybe someone more experienced can comment?
I can't think of any case where you would want C: to be reported as a non-fixed drive - I suspect Windows may behave this way even if it was installed to a removable disk - and as far as wine users
are concerned, the C: drive should be a fixed drive.
More importantly my patch should not introduce any secondary bugs, and that was my top priority.
You say it reports DRIVE_UNKNOWN, but create_drive_devices uses this logic:
drive_type = i < 2 ? DEVICE_FLOPPY : DEVICE_HARDDISK_VOL;
To me it was pretty clear that all drives without a registry value are going to show up as DEVICE_HARDDISK_VOL, which translates to DRIVE_FIXED, which means that the "auto-detect" type is not being
used on drives without an override value (and winecfg stores no registry value for drives set to auto-detect, so it can only be set with regedit).
I was afraid of changing that logic due to the probability of introducing new bugs, and thought that someone who knows that code should tackle that when they have time.
Author of DarkPlaces Quake1 engine - http://icculus.org/twilight/darkplaces/
Co-designer of Nexuiz - http://alientrap.org/nexuiz
"War does not prove who is right, it proves who is left." - Unknown
"Any sufficiently advanced technology is indistinguishable from a rigged demo." - James Klass
"A game is a series of interesting choices." - Sid Meier
More information about the wine-devel