[pypy-commit] lang-smalltalk rbitblt: stupid me ... only replace slashes on windows

timfel noreply at buildbot.pypy.org
Thu Jan 16 15:04:31 CET 2014


Author: Tim Felgentreff <timfelgentreff at gmail.com>
Branch: rbitblt
Changeset: r568:d70d89b47bf9
Date: 2014-01-10 11:22 +0100
http://bitbucket.org/pypy/lang-smalltalk/changeset/d70d89b47bf9/

Log:	stupid me ... only replace slashes on windows

diff --git a/targetimageloadingsmalltalk.py b/targetimageloadingsmalltalk.py
--- a/targetimageloadingsmalltalk.py
+++ b/targetimageloadingsmalltalk.py
@@ -191,7 +191,9 @@
     if path is None:
         path = "Squeak.image"
 
-    path = os.path.join(os.getcwd(), path).replace("/", "\\")
+    path = os.path.join(os.getcwd(), path)
+    if os.name == "nt":
+        path = path.replace("/", "\\")
     try:
         f = open_file_as_stream(path, mode="rb", buffering=0)
     except OSError as e:


More information about the pypy-commit mailing list