diff options
author | Hugo Lima <hugo.lima@openbossa.org> | 2009-11-18 10:17:54 -0200 |
---|---|---|
committer | Hugo Lima <hugo.lima@openbossa.org> | 2009-11-18 10:17:54 -0200 |
commit | f2b81bc077d6bdec8d846db0f7a7e28e6472894d (patch) | |
tree | 762d9a18be4351fcc083487937e5140d9109a533 /main.cpp | |
parent | e4c1f6a91ad8f12a196948ca52231f6353b0f233 (diff) |
Creates the output directory if it doesn't exists.
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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); |