From a98134b316502b261419f6ca1baa8283f8ee5a39 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Tue, 20 Dec 2011 18:46:30 -0800 Subject: [PATCH] lorax: check for output directory early and quit --- src/sbin/lorax | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sbin/lorax b/src/sbin/lorax index 06bc019a..8d73ac6c 100755 --- a/src/sbin/lorax +++ b/src/sbin/lorax @@ -93,6 +93,9 @@ def main(args): or not opts.source or not outputdir: parser.error("missing one or more required arguments") + if os.path.exists(outputdir): + parser.error("output directory should not exist.") + # create the temporary directory for lorax tempdir = tempfile.mkdtemp(prefix="lorax.", dir=tempfile.gettempdir())