From: Victor Stinner Date: Thu, 7 Oct 2010 22:42:51 +0000 (+0000) Subject: copy_absolute() raises a fatal error on _Py_wgetcwd() failure X-Git-Tag: v3.2a3~25 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=41c8b377d72888db12cd5dd406b332fa4bb17ad1;p=thirdparty%2FPython%2Fcpython.git copy_absolute() raises a fatal error on _Py_wgetcwd() failure --- diff --git a/Modules/getpath.c b/Modules/getpath.c index 139d753b558d..ee784dd7f1c1 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);