From c141a081bd2c74e7c409416941e4952ef5b774ee Mon Sep 17 00:00:00 2001 From: midipix Date: Wed, 23 Dec 2020 01:35:15 +0000 Subject: slbt_exec_{compile|link}(): properly record the not-found path upon error. --- src/logic/slbt_exec_compile.c | 3 ++- src/logic/slbt_exec_link.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/logic') diff --git a/src/logic/slbt_exec_compile.c b/src/logic/slbt_exec_compile.c index dca6e1e..7a934ab 100644 --- a/src/logic/slbt_exec_compile.c +++ b/src/logic/slbt_exec_compile.c @@ -155,8 +155,9 @@ int slbt_exec_compile( /* .libs directory */ if (cctx->drvflags & SLBT_DRIVER_SHARED) if (slbt_mkdir(dctx,ectx->ldirname)) { + ret = SLBT_SYSTEM_ERROR(dctx,ectx->ldirname); slbt_free_exec_ctx(actx); - return SLBT_SYSTEM_ERROR(dctx,ectx->ldirname); + return ret; } /* compile mode */ diff --git a/src/logic/slbt_exec_link.c b/src/logic/slbt_exec_link.c index 2ffb6ad..5e42861 100644 --- a/src/logic/slbt_exec_link.c +++ b/src/logic/slbt_exec_link.c @@ -1765,8 +1765,9 @@ int slbt_exec_link( /* .libs directory */ if (slbt_mkdir(dctx,ectx->ldirname)) { + ret = SLBT_SYSTEM_ERROR(dctx,ectx->ldirname); slbt_free_exec_ctx(actx); - return SLBT_SYSTEM_ERROR(dctx,ectx->ldirname); + return ret; } /* non-pic libfoo.a */ -- cgit v1.2.3