Wine ignores drive types

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
robert1307
Newbie
Newbie
Posts: 3
Joined: Mon May 20, 2024 11:14 pm

Wine ignores drive types

Post by robert1307 »

Using wine-stable in Debian Bookworm.

Using winecfg added several drives pointing to the same local folder and assigned different types of drives to them:
- Autodetect
- Local hard disk
- Network share
- Floppy disk
- CD-ROM

However, getting DRIVE_REMOTE type for all of them:

Code: Select all

01c4:trace:volume:GetDriveTypeW L"D:\\" -> 4
01c4:trace:volume:GetDriveTypeW L"E:\\" -> 4
01c4:trace:volume:GetDriveTypeW L"F:\\" -> 4
01c4:trace:volume:GetDriveTypeW L"G:\\" -> 4
01c4:trace:volume:GetDriveTypeW L"H:\\" -> 4
What could be the reason?

Local folder is an NFS share mounted inside a docker container, but should it matter? Shouldn't wine accept whichever drive type is defined? And how does it know it's a remote (network) folder?
robert1307
Newbie
Newbie
Posts: 3
Joined: Mon May 20, 2024 11:14 pm

Re: Wine ignores drive types

Post by robert1307 »

Ok, after a quick investigation it seems that drive type set in winecfg has no any effect on GetDriveType.
GetDriveType calls fstatfs in linux and uses filesystem type (fs_stats.f_type) returned from it. The only way to make it think it's a CDROM is mounting iso through the loop device, or using of some kind of cdemu tool.
This is not doable within a docker container without escalating privileges which is not an option for me.
Will have to patch executable till a better solution is found.
Locked