Kaydet (Commit) f3335e19 authored tarafından Guido van Rossum's avatar Guido van Rossum

Patch inspired by Just van Rossum: on the Mac, in savefilename(), make

the path to save a relative path by prefixing it with os.sep (':').
Also fix an indent inconsistency in the same function.
üst c009d198
...@@ -95,9 +95,11 @@ class Sucker(webchecker.Checker): ...@@ -95,9 +95,11 @@ class Sucker(webchecker.Checker):
host, port = urllib.splitnport(host) host, port = urllib.splitnport(host)
host = string.lower(host) host = string.lower(host)
if not path or path[-1] == "/": if not path or path[-1] == "/":
path = path + "index.html" path = path + "index.html"
if os.sep != "/": if os.sep != "/":
path = string.join(string.split(path, "/"), os.sep) path = string.join(string.split(path, "/"), os.sep)
if os.name == "mac":
path = os.sep + path
path = os.path.join(host, path) path = os.path.join(host, path)
return path return path
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment