diff options
Diffstat (limited to 'tools/scan-build-py/libscanbuild/report.py')
-rw-r--r-- | tools/scan-build-py/libscanbuild/report.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/scan-build-py/libscanbuild/report.py b/tools/scan-build-py/libscanbuild/report.py index efc0a55de619e..5c33319e206df 100644 --- a/tools/scan-build-py/libscanbuild/report.py +++ b/tools/scan-build-py/libscanbuild/report.py @@ -35,7 +35,12 @@ def report_directory(hint, keep): keep -- a boolean value to keep or delete the empty report directory. """ stamp = time.strftime('scan-build-%Y-%m-%d-%H%M%S-', time.localtime()) - name = tempfile.mkdtemp(prefix=stamp, dir=hint) + + parentdir = os.path.abspath(hint) + if not os.path.exists(parentdir): + os.makedirs(parentdir) + + name = tempfile.mkdtemp(prefix=stamp, dir=parentdir) logging.info('Report directory created: %s', name) |