diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-10-07 22:42:51 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-10-07 22:42:51 (GMT) |
commit | 41c8b377d72888db12cd5dd406b332fa4bb17ad1 (patch) | |
tree | f8e3f4315055a78051fc8caeba9cf91796240474 /Modules/getpath.c | |
parent | 015f4d87ab0f7d0888a9f20672feaec373f8ef36 (diff) | |
download | cpython-41c8b377d72888db12cd5dd406b332fa4bb17ad1.zip cpython-41c8b377d72888db12cd5dd406b332fa4bb17ad1.tar.gz cpython-41c8b377d72888db12cd5dd406b332fa4bb17ad1.tar.bz2 |
copy_absolute() raises a fatal error on _Py_wgetcwd() failure
Diffstat (limited to 'Modules/getpath.c')
-rw-r--r-- | Modules/getpath.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/getpath.c b/Modules/getpath.c index 139d753..ee784dd 100644 --- a/Modules/getpath.c +++ b/Modules/getpath.c @@ -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); |