Skip to content

Commit 3029035

Browse files
authored
bpo-20443: Fix calculate_program_full_path() warning (GH-14446)
Don't call _Py_isabs() with a bytes string (char*), the function expects as wide string.
1 parent b1263d5 commit 3029035

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/getpath.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ calculate_program_full_path(const PyConfig *config,
761761
* absolutize() should help us out below
762762
*/
763763
else if(0 == _NSGetExecutablePath(execpath, &nsexeclength) &&
764-
_Py_isabs(execpath))
764+
(wchar_t)execpath[0] == SEP)
765765
{
766766
size_t len;
767767
wchar_t *path = Py_DecodeLocale(execpath, &len);

0 commit comments

Comments
 (0)