diff --git a/Tools/ttcompile b/Tools/ttcompile index 77b2e3b75..4a2ba9f40 100755 --- a/Tools/ttcompile +++ b/Tools/ttcompile @@ -68,12 +68,14 @@ if nargs == 1: elif nargs == 2: xmlPath = args[0] outPath = args[1] - print "000", outPath if os.path.isdir(outPath): outPath = makeOutputFileName(xmlPath, outPath) files = [(xmlPath, outPath)] else: outputDir = args[-1] + if not os.path.isdir(outputDir): + print "last argument must be an existing directory" + sys.exit(2) files = [] for xmlPath in args[:-1]: files.append((xmlPath, makeOutputFileName(xmlPath, outputDir))) diff --git a/Tools/ttdump b/Tools/ttdump index 5f0a1a076..f27daba24 100755 --- a/Tools/ttdump +++ b/Tools/ttdump @@ -102,6 +102,9 @@ elif nargs == 2: files = [(ttPath, outPath)] else: outputDir = args[-1] + if not os.path.isdir(outputDir): + print "last argument must be an existing directory" + sys.exit(2) files = [] for ttPath in args[:-1]: files.append((ttPath, makeOutputFileName(ttPath, outputDir)))