Commit d328a9b5 authored by Guido van Rossum's avatar Guido van Rossum

Fix the way a trailing / is changed to /index.html so that it

doesn't depend on the value of os.sep.  (I.e. ported to Windows :-)
parent 6eb9d32c
......@@ -85,10 +85,11 @@ class Sucker(webchecker.Checker):
user, host = urllib.splituser(host)
host, port = urllib.splitnport(host)
host = string.lower(host)
path = os.path.join(host, path)
if path[-1] == "/": path = path + "index.html"
if not path or path[-1] == "/":
path = path + "index.html"
if os.sep != "/":
path = string.join(string.split(path, "/"), os.sep)
path = os.path.join(host, path)
return path
def makedirs(dir):
......
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