Commits

Amaury Forgeot d'Arc  committed 553847e

Keep the path where both args are raw strings

  • Participants
  • Parent commits 33df72c
  • Branches unicode_filename-2

Comments (0)

Files changed (1)

File pypy/rlib/rposix.py

 
 @specialize.argtype(0, 1)
 def rename(path1, path2):
-    return os.rename(path1.as_bytes(), path2.as_bytes())
+    if isinstance(path1, str):
+        return os.rename(path1, path2)
+    else:
+        return os.rename(path1.as_bytes(), path2.as_bytes())
 
 @specialize.argtype(0)
 def listdir(dirname):