diff options
author | Matti Picus <matti.picus@gmail.com> | 2020-10-28 08:09:05 +0200 |
---|---|---|
committer | Matti Picus <matti.picus@gmail.com> | 2020-10-28 08:09:05 +0200 |
commit | 41e64e5353f7bcc9d79d4901f628aaaf8dbba179 (patch) | |
tree | 0b1f83482e1dfae66c729333f158a9d62f6ac327 /rpython | |
parent | fail early in rstr.do_stringformat for ints too small, not when speciallizing... (diff) | |
parent | backport changes from py3.6 (diff) | |
download | pypy-41e64e5353f7bcc9d79d4901f628aaaf8dbba179.tar.gz pypy-41e64e5353f7bcc9d79d4901f628aaaf8dbba179.tar.bz2 pypy-41e64e5353f7bcc9d79d4901f628aaaf8dbba179.zip |
merge default into branch
Diffstat (limited to 'rpython')
-rw-r--r-- | rpython/rlib/rposix.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/rpython/rlib/rposix.py b/rpython/rlib/rposix.py index f006d854ae..fd82a3394a 100644 --- a/rpython/rlib/rposix.py +++ b/rpython/rlib/rposix.py @@ -925,6 +925,11 @@ def listdir(path): raise OSError(get_saved_errno(), "opendir failed") return _listdir(dirp) else: # _WIN32 case + if not path: + traits = _preferred_traits('') + win32traits = make_win32_traits(traits) + raise OSError(win32traits.ERROR_FILE_NOT_FOUND, + "listdir called with invalid path") traits = _preferred_traits(path) win32traits = make_win32_traits(traits) path = traits.as_str0(path) |