https://bugs.winehq.org/show_bug.cgi?id=52256
Bug ID: 52256 Summary: Current working directory reset to "/" executing a winegcc/wineg++ compiled program Product: Wine Version: 6.6 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winelib Assignee: wine-bugs@winehq.org Reporter: sacrom@gmail.com Distribution: ---
This is exactly the same bug (from the behaviour point of view) than:
https://bugs.winehq.org/show_bug.cgi?id=49545
Fixed by commit:
https://source.winehq.org/git/wine.git/commit/cdaa72c728df3c80499c8a4f59e731...)
---
It seems a "regression" between WINE 6.5 & WINE 6.6 happened.
Since Wine version 6.6 the current working directory is reset to "/" when executing a winegcc/wineg++ generated program (winelib). While in Wine 6.5 and previous versions (from 6.0 onwards) the current working directory was the directory where the command was executed from.
---
Here you can see the program, compilation and result using the latest WINE 7.0 RC2:
[sc@generic_linux1_64]/sc/tmp/wine$ wine --version wine-7.0-rc2
[sc@generic_linux1_64]/sc/tmp/wine$ cat showdir.c #include <unistd.h> #include <stdio.h>
void main(void) { char buf[256];
getcwd(buf, sizeof(buf)); fprintf(stderr, "getcwd() => %s\n", buf); }
[sc@generic_linux1_64]/sc/tmp/wine$ winegcc -o showdir_wine showdir.c
[sc@generic_linux1_64]/sc/tmp/wine$ ./showdir_wine.exe getcwd() => /
Searching for the WINE version, that introduced the difference:
WINE 6.5 WORKING ----------------
[sc@generic_linux1_64]/sc/tmp/wine$ ./showdir_wine.exe getcwd() => /sc/tmp/wine [sc@generic_linux1_64]/sc/tmp/wine$ wine --version wine-6.5
WINE 6.6 NOT WORKING --------------------
[sc@generic_linux1_64]/sc/tmp/wine$ ./showdir_wine.exe getcwd() => / [sc@generic_linux1_64]/sc/tmp/wine$ wine --version wine-6.6
https://bugs.winehq.org/show_bug.cgi?id=52256
Marcos GutiƩrrez Batz sacrom@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression CC| |sacrom@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=52256
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |04762b357635d3adb85ccd5e345 | |6e81c23033394
https://bugs.winehq.org/show_bug.cgi?id=52256
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED Fixed by SHA1| |3e73437ae8f04a12200bf537758 | |d22e5f9723637
--- Comment #1 from Alexandre Julliard julliard@winehq.org --- It should be fixed by 3e73437ae8f04a12200bf537758d22e5f9723637.
https://bugs.winehq.org/show_bug.cgi?id=52256
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net
--- Comment #2 from Anastasius Focht focht@gmx.net --- Hello folks,
this causes another regression. I've created bug 52311 ("Starting executables from removable devices no longer works with Wine 7.0-rc3-7-g3e73437ae8f") to track it.
Regards
https://bugs.winehq.org/show_bug.cgi?id=52256
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 7.0-rc4.