]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Patch inspired by Just van Rossum: on the Mac, in savefilename(), make
authorGuido van Rossum <guido@python.org>
Tue, 25 Apr 2000 21:13:24 +0000 (21:13 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 25 Apr 2000 21:13:24 +0000 (21:13 +0000)
the path to save a relative path by prefixing it with os.sep (':').
Also fix an indent inconsistency in the same function.

Tools/webchecker/websucker.py

index b416891455b90ff631854d534f14a7bbb6306e61..5f726b36ce8593ff6a0fc17e653b2e9d4e2b38f3 100755 (executable)
@@ -95,9 +95,11 @@ class Sucker(webchecker.Checker):
         host, port = urllib.splitnport(host)
         host = string.lower(host)
         if not path or path[-1] == "/":
-                path = path + "index.html"
+            path = path + "index.html"
         if os.sep != "/":
             path = string.join(string.split(path, "/"), os.sep)
+            if os.name == "mac":
+                path = os.sep + path
         path = os.path.join(host, path)
         return path