Author: Armin Rigo <ar...@tunes.org>
Branch: 
Changeset: r95005:090965df249b
Date: 2018-08-16 08:12 +0200
http://bitbucket.org/pypy/pypy/changeset/090965df249b/

Log:    Issue 2870

        Fix Windows os.listdir() for some cases (see CPython #32539 for the
        fix and the test that will show up at the next merge of the stdlib)

diff --git a/rpython/rlib/rposix.py b/rpython/rlib/rposix.py
--- a/rpython/rlib/rposix.py
+++ b/rpython/rlib/rposix.py
@@ -874,11 +874,11 @@
 
         if traits.str is unicode:
             if path and path[-1] not in (u'/', u'\\', u':'):
-                path += u'/'
+                path += u'\\'
             mask = path + u'*.*'
         else:
             if path and path[-1] not in ('/', '\\', ':'):
-                path += '/'
+                path += '\\'
             mask = path + '*.*'
 
         filedata = lltype.malloc(win32traits.WIN32_FIND_DATA, flavor='raw')
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to