mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
copy_absolute() raises a fatal error on _Py_wgetcwd() failure
This commit is contained in:
parent
015f4d87ab
commit
41c8b377d7
1 changed files with 2 additions and 1 deletions
|
|
@ -236,7 +236,8 @@ copy_absolute(wchar_t *path, wchar_t *p)
|
|||
if (p[0] == SEP)
|
||||
wcscpy(path, p);
|
||||
else {
|
||||
_Py_wgetcwd(path, MAXPATHLEN);
|
||||
if (!_Py_wgetcwd(path, MAXPATHLEN))
|
||||
Py_FatalError("unable to get the current directory");
|
||||
if (p[0] == '.' && p[1] == SEP)
|
||||
p += 2;
|
||||
joinpath(path, p);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue