http://bugs.winehq.org/show_bug.cgi?id=59272 Bug ID: 59272 Summary: COM ports resolved relative to working directory instead of dosdevices Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: kernel32 Assignee: wine-bugs@list.winehq.org Reporter: hilgert@mail.ru Distribution: --- Wine incorrectly resolves COM port paths relative to the current working directory instead of using the symlinks in ~/.wine/dosdevices/, causing CreateFile() calls for COM ports to fail when the application is launched from subdirectories. STEPS TO REPRODUCE: 1. Create a symlink in dosdevices: ln -s /dev/ttyUSB0 ~/.wine/dosdevices/com1 2. Create a test application that calls: CreateFile("COM1", GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); 3. Run the application from C:\: cd ~/.wine/drive_c/ wine test.exe Result: COM1 opens successfully via /dev/ttyUSB0 4. Run the application from a subdirectory: cd ~/.wine/drive_c/subdir/ wine test.exe Result: CreateFile fails with ERROR_FILE_NOT_FOUND EXPECTED BEHAVIOR: COM ports should always resolve through dosdevices symlinks regardless of working directory, matching Windows behavior where COM1 is a global device namespace. ACTUAL BEHAVIOR: Wine attempts to open "C:\subdir\COM1" as a regular file instead of resolving COM1 through dosdevices. DEBUG TRACE: trace:file:CreateFileW L"COM1" GENERIC_READ GENERIC_WRITE creation 3 attributes 0x0 trace:file:NtCreateFile name=L"\\??\\C:\\subdir\\COM1" warn:file:NtCreateFile L"\\??\\C:\\subdir\\COM1" not found (c0000034) WORKAROUND: Creating a symlink directly in the working directory allows the application to open the port, but this is not portable and breaks when changing directories: ln -s /dev/ttyUSB0 ~/.wine/drive_c/subdir/COM1 ADDITIONAL NOTES: This affects serial communication applications that rely on standard COM port naming conventions. The issue appears to be in how Wine's file path resolution handles device names. On real Windows, device names like COM1, LPT1, etc. are resolved through the device namespace regardless of the current directory. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.