diff --git a/src/logic/slbt_exec_compile.c b/src/logic/slbt_exec_compile.c index 3d04304..c5c3e70 100644 --- a/src/logic/slbt_exec_compile.c +++ b/src/logic/slbt_exec_compile.c @@ -61,8 +61,10 @@ int slbt_exec_compile( if ((fdlibs = open(ectx->ldirname,O_DIRECTORY)) >= 0) close(fdlibs); else if ((errno != ENOENT) || mkdir(ectx->ldirname,0777)) { - slbt_free_exec_ctx(actx); - return -1; + if (errno != EEXIST) { + slbt_free_exec_ctx(actx); + return -1; + } } } diff --git a/src/logic/slbt_exec_link.c b/src/logic/slbt_exec_link.c index 0230051..847bc95 100644 --- a/src/logic/slbt_exec_link.c +++ b/src/logic/slbt_exec_link.c @@ -1066,8 +1066,10 @@ int slbt_exec_link( if ((fdlibs = open(ectx->ldirname,O_DIRECTORY)) >= 0) close(fdlibs); else if ((errno != ENOENT) || mkdir(ectx->ldirname,0777)) { - slbt_free_exec_ctx(actx); - return -1; + if (errno != EEXIST) { + slbt_free_exec_ctx(actx); + return -1; + } } }