From 7f23ee90fd545995a29e2175f15e8b97e59ca67a Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 17:13:13 +0200 Subject: 3.20 --- library/lock_holder.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'library/lock_holder.h') diff --git a/library/lock_holder.h b/library/lock_holder.h index dc88ce71..172209dc 100644 --- a/library/lock_holder.h +++ b/library/lock_holder.h @@ -5,6 +5,7 @@ #include "../shared/zstring.h" #include "dir_lock.h" #include "status_handler.h" +#include "dir_exist_async.h" namespace zen { @@ -16,7 +17,10 @@ class LockHolder public: void addDir(const Zstring& dirnameFmt, ProcessCallback& procCallback) //resolved dirname ending with path separator { - if (dirnameFmt.empty()) return; + if (dirnameFmt.empty() || + !dirExistsUpdating(dirnameFmt, procCallback)) + return; + if (lockHolder.find(dirnameFmt) != lockHolder.end()) return; assert(dirnameFmt.EndsWith(FILE_NAME_SEPARATOR)); //this is really the contract, formatting does other things as well, e.g. macro substitution @@ -37,7 +41,7 @@ public: catch (const FileError& e) { bool dummy = false; //this warning shall not be shown but logged only - procCallback.reportWarning(e.msg(), dummy); + procCallback.reportWarning(e.msg(), dummy); //may throw! } } -- cgit