We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ba93cea commit 326786bCopy full SHA for 326786b
1 file changed
dll/win32/msvcrt/dir.c
@@ -235,6 +235,18 @@ int CDECL _wchdir(const wchar_t * newdir)
235
msvcrt_set_errno(newdir?GetLastError():0);
236
return -1;
237
}
238
+#ifdef __REACTOS__
239
+ /* Update the drive-specific current directory variable */
240
+ WCHAR fulldir[MAX_PATH];
241
+ if (GetCurrentDirectoryW(ARRAYSIZE(fulldir), fulldir) >= 2)
242
+ {
243
+ if (fulldir[1] == L':')
244
245
+ WCHAR envvar[4] = { L'=', towupper(fulldir[0]), L':', L'\0' };
246
+ SetEnvironmentVariableW(envvar, fulldir);
247
+ }
248
249
+#endif
250
return 0;
251
252
0 commit comments