We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e9b4131 commit b70fd54Copy full SHA for b70fd54
Modules/getpath.c
@@ -799,7 +799,7 @@ progname_to_dict(PyObject *dict, const char *key)
799
}
800
#elif defined(HAVE_READLINK)
801
wchar_t resolved[MAXPATHLEN + 1];
802
- if (_Py_wreadlink(L"/proc/self/exe", resolved, Py_ARRAY_LENGTH(resolved)) != -1) {
+ if (_Py_wreadlink(L"/proc/self/exe", resolved, Py_ARRAY_LENGTH(resolved)) > 0) {
803
return wchar_to_dict(dict, key, resolved);
804
805
#endif
0 commit comments