add trailing directory slash

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@1463 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2004-08-23 22:27:24 +00:00
parent 4e654e327b
commit 01976e953b

View file

@ -74,6 +74,9 @@ class FileUrl (urlbase.UrlBase):
super(FileUrl, self).build_url()
# ignore query and fragment url parts for filesystem urls
self.urlparts[3] = self.urlparts[4] = ''
if self.is_directory() and not self.urlparts[2].endswith('/'):
self.add_warning(_("Added trailing slash to directory"))
self.urlparts[2] += '/'
self.url = urlparse.urlunsplit(self.urlparts)
def check_connection (self):