fix join of extra path into outputdirectory. fixes #262

This commit is contained in:
clinton-hall 2014-02-13 22:19:10 +10:30
commit 0ac9cea833
2 changed files with 6 additions and 0 deletions

View file

@ -129,6 +129,8 @@ def main(inputDirectory, inputName, inputCategory, inputHash, inputID):
if inputCategory in noFlatten:
newDir = dirpath # find the full path
newDir = newDir.replace(inputDirectory, "") #find the extra-depth directory
if newDir[0] == "/":
newDir = newDir[1:] # remove leading "/" to enable join to work.
outputDestination = os.path.join(outputDestinationMaster, newDir) # join this extra directory to output.
Logger.debug("MAIN: Setting outputDestination to %s to preserve folder structure", outputDestination)