r100051 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100050‎ | r100051 | r100052 >
Date:16:46, 17 October 2011
Author:ariel
Status:deferred
Tags:
Comment:
and actually make relative path contruction work
Modified paths:
  • /branches/ariel/xmldumps-backup/WikiDump.py (modified) (history)

Diff [purge]

Index: branches/ariel/xmldumps-backup/WikiDump.py
@@ -427,16 +427,19 @@
428428 return os.path.join(self.config.privateDir, self.dbName)
429429
430430 def webDir(self):
431 - return "/".join((self.config.webRoot, self.dbName))
 431+ webRoot = self.config.webRoot
 432+ if webRoot[-1] == '/':
 433+ webRoot = webRoot[:-1]
 434+ return "/".join((webRoot, self.dbName))
432435
433436 def webDirRelative(self):
434437 webRootRelative = self.webDir()
435438 i = webRootRelative.find("://")
436439 if i >= 0:
437 - webRootRelative = webRootRelative[i:]
 440+ webRootRelative = webRootRelative[i+3:]
438441 i = webRootRelative.find("/")
439442 if i >= 0:
440 - webRootRelative = webRootRelative[i:]
 443+ webRootRelative = webRootRelative[i:]
441444 return webRootRelative
442445
443446 # Actions!

Status & tagging log