https://bugs.winehq.org/show_bug.cgi?id=49451
Bug ID: 49451 Summary: [5.11 regression] getcwd always returns Z:\ Product: Wine Version: 5.11 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: xantares09@hotmail.com Distribution: ---
Created attachment 67553 --> https://bugs.winehq.org/attachment.cgi?id=67553 simple C example calling getcwd
in wine 5.11, getcwd always returns Z:\ whatever the current dir wine is run from this is from archlinux x86_64
try compile this main.c with mingw and run it:
#include <unistd.h> #include <stdio.h> #include <limits.h>
int main() { char cwd[PATH_MAX]; if (getcwd(cwd, sizeof(cwd)) != NULL) { printf("Current working dir: %s\n", cwd); } else { perror("getcwd() error"); return 1; } return 0; }
$ cd /tmp $ x86_64-w64-mingw32-gcc main.c $ wine a.exe Current working dir: Z:\
with wine 5.10 we get: Current working dir: Z:\tmp