no need to preserve folder structure when single file.

This commit is contained in:
clinton-hall 2014-04-10 11:27:33 +09:30
commit 41ac893c81

View file

@ -92,7 +92,7 @@ def main(inputDirectory, inputName, inputCategory, inputHash, inputID):
for file in filenames: for file in filenames:
filePath = os.path.join(dirpath, file) filePath = os.path.join(dirpath, file)
fileName, fileExtension = os.path.splitext(file) fileName, fileExtension = os.path.splitext(file)
if inputCategory in noFlatten: if inputCategory in noFlatten and not single:
newDir = dirpath # find the full path newDir = dirpath # find the full path
newDir = newDir.replace(inputDirectory, "") #find the extra-depth directory newDir = newDir.replace(inputDirectory, "") #find the extra-depth directory
if len(newDir) > 0 and newDir[0] == "/": if len(newDir) > 0 and newDir[0] == "/":