https://bugs.winehq.org/show_bug.cgi?id=48491
Bug ID: 48491 Summary: _searchenv & co do not understand quoted directories Product: Wine Version: 5.0-rc4 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: msvcrt Assignee: wine-bugs@winehq.org Reporter: wine@thecybershadow.net Distribution: ---
The following test program produces the expected result ("testdir\testfile") on Windows, but fails on Wine:
#include <io.h> #include <direct.h> #include <stdlib.h> #include <sys/stat.h> #include <stdio.h>
int main(void) { char buf[64];
_mkdir("testdir"); _close(_creat("testdir\testfile", _S_IREAD | _S_IWRITE));
_putenv("TESTVAR="testdir""); _searchenv("testfile", "TESTVAR", buf); printf("Result: %s\n", buf); }
The cause seems to be that Wine doesn't seem to implement the quoting syntax in the searchenv function family.
The problem was noticed when MS link.exe invocation failed on Wine but not Windows, with identical environment / inputs. Such environment variables can occur when building search paths for linker libraries (%LIB%), as seen here:
https://github.com/dlang/dmd/blob/81710a5e548f047588bd3ee6ffb13a8d6f1b9bff/i...
https://bugs.winehq.org/show_bug.cgi?id=48491
Piotr Caban piotr.caban@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |1d0cca465ab6b185dd91db00f61 | |d9ad5d272a766 CC| |piotr.caban@gmail.com Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
--- Comment #1 from Piotr Caban piotr.caban@gmail.com --- The test application is working now. Marking as fixed.
https://bugs.winehq.org/show_bug.cgi?id=48491
--- Comment #2 from Vladimir Panteleev wine@thecybershadow.net --- Thanks Piotr. I noticed you updated only searchenv, but not the other variants (searchenv_s, wsearchenv, wsearchenv_s)?
https://bugs.winehq.org/show_bug.cgi?id=48491
--- Comment #3 from Piotr Caban piotr.caban@gmail.com --- The other variants were updated later, see: 2e7ad72a8dae21aa5a16396c408007d48e43f5ec 98c554ac0617c642bc4481e6f56e0d66adec660a f05549b7f71740362ae5ef6dc8d5e846f8c41f0b 1b5a551324e113afefd247e703cc59c03ad80a9d commits.
https://bugs.winehq.org/show_bug.cgi?id=48491
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #4 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 5.1.
https://bugs.winehq.org/show_bug.cgi?id=48491
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |5.0.x
https://bugs.winehq.org/show_bug.cgi?id=48491
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|5.0.x |---
--- Comment #5 from Michael Stefaniuc mstefani@winehq.org --- Removing the 5.0.x milestone from bug fixes included in 5.0.1.