From 21c168bf02bbab8b473873f0822d68859a025c24 Mon Sep 17 00:00:00 2001 From: "@syxhe" Date: Wed, 22 Oct 2025 00:41:19 -0500 Subject: Fix threadpool after ripping out cleanup function suite --- src/encryption.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/encryption.c') diff --git a/src/encryption.c b/src/encryption.c index 6df1ff3..2ead9cf 100644 --- a/src/encryption.c +++ b/src/encryption.c @@ -212,7 +212,8 @@ int maketmp(const char * const dest) { * @retval (int)[-1, 0] 0 on success, -1 on error */ int linkto(const char * const target, int tgfd) { - if(!target || tgfd < 0 || access(target, F_OK) != -1) ERRRET(EINVAL, -1); + if(!target || tgfd < 0) ERRRET(EINVAL, -1); + if(access(target, F_OK) != -1) ERRRET(EEXIST, -1); char *path = NULL; asprintf(&path, "/proc/self/fd/%d", tgfd); -- cgit v1.2.3