bam pack: Support for passing the dir only

if you give a dir as output, it will use the input path name. (changing blend to zip if needed)
This commit is contained in:
2015-05-22 22:55:26 +10:00
parent ab8f30f212
commit 89f3ae2649

View File

@@ -1332,6 +1332,12 @@ class bam_commands:
if output is None:
fatal("Output path must be given when packing with: --mode=FILE")
if os.path.isdir(output):
if mode == "ZIP":
output = os.path.join(output, os.path.splitext(path)[0] + ".zip")
else: # FILE
output = os.path.join(output, os.path.basename(path))
if use_quiet:
report = lambda msg: None
else: