summaryrefslogtreecommitdiffstats
path: root/main.cpp
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2009-11-18 10:17:54 -0200
committerHugo Lima <hugo.lima@openbossa.org>2009-11-18 10:17:54 -0200
commitf2b81bc077d6bdec8d846db0f7a7e28e6472894d (patch)
tree762d9a18be4351fcc083487937e5140d9109a533 /main.cpp
parente4c1f6a91ad8f12a196948ca52231f6353b0f233 (diff)
downloadgeneratorrunner-f2b81bc077d6bdec8d846db0f7a7e28e6472894d.tar.gz
generatorrunner-f2b81bc077d6bdec8d846db0f7a7e28e6472894d.tar.xz
generatorrunner-f2b81bc077d6bdec8d846db0f7a7e28e6472894d.zip
Creates the output directory if it doesn't exists.
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp
index 6c6c8f7..b251b0c 100644
--- a/main.cpp
+++ b/main.cpp
@@ -160,6 +160,12 @@ int main(int argc, char *argv[])
}
QString outputDirectory = args.contains("output-directory") ? args["output-directory"] : "out";
+ if (!QDir(outputDirectory).exists()) {
+ if (!QDir().mkpath(outputDirectory)) {
+ ReportHandler::warning("Can't create output directory: "+outputDirectory);
+ return EXIT_FAILURE;
+ }
+ }
// Create and set-up API Extractor
ApiExtractor extractor;
extractor.setLogDirectory(outputDirectory);