commit | 41c8b377d72888db12cd5dd406b332fa4bb17ad1 | [log] [tgz] |
---|---|---|
author | Victor Stinner <victor.stinner@haypocalc.com> | Thu Oct 07 22:42:51 2010 +0000 |
committer | Victor Stinner <victor.stinner@haypocalc.com> | Thu Oct 07 22:42:51 2010 +0000 |
tree | f8e3f4315055a78051fc8caeba9cf91796240474 | |
parent | 015f4d87ab0f7d0888a9f20672feaec373f8ef36 [diff] [blame] |
copy_absolute() raises a fatal error on _Py_wgetcwd() failure
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 @@ 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);