From cec432f94d32abdd1cb34735357523c4149365d0 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 23 Apr 2012 14:43:59 +0000 Subject: [PATCH] minor update --- lib/core/option.py | 2 +- lib/core/purge.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/core/option.py b/lib/core/option.py index 384de0e8b..403eb3196 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -1378,7 +1378,7 @@ def __purgeOutput(): Safely removes (purges) output directory. """ - if conf.purgeOutput and os.path.isdir(paths.SQLMAP_OUTPUT_PATH): + if conf.purgeOutput: purge(paths.SQLMAP_OUTPUT_PATH) def __setConfAttributes(): diff --git a/lib/core/purge.py b/lib/core/purge.py index 36d08dc22..575e23f70 100644 --- a/lib/core/purge.py +++ b/lib/core/purge.py @@ -21,6 +21,8 @@ def purge(directory): """ if not os.path.isdir(directory): + warnMsg = "skipping purging of directory '%s' as it does not exist" % directory + logger.warn(warnMsg) return infoMsg = "purging content of directory ('%s'). Please wait as this could take a while" % directory