diff --git a/Modules/getpath.c b/Modules/getpath.c index ee784dd7f1c..9e5934d739e 100644 --- a/Modules/getpath.c +++ b/Modules/getpath.c @@ -236,8 +236,11 @@ copy_absolute(wchar_t *path, wchar_t *p) if (p[0] == SEP) wcscpy(path, p); else { - if (!_Py_wgetcwd(path, MAXPATHLEN)) - Py_FatalError("unable to get the current directory"); + if (!_Py_wgetcwd(path, MAXPATHLEN)) { + /* unable to get the current directory */ + wcscpy(path, p); + return; + } if (p[0] == '.' && p[1] == SEP) p += 2; joinpath(path, p);