summaryrefslogtreecommitdiff
path: root/src/encryption.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/encryption.c')
-rw-r--r--src/encryption.c3
1 files changed, 2 insertions, 1 deletions
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) {
212 * @retval (int)[-1, 0] 0 on success, -1 on error 212 * @retval (int)[-1, 0] 0 on success, -1 on error
213 */ 213 */
214int linkto(const char * const target, int tgfd) { 214int linkto(const char * const target, int tgfd) {
215 if(!target || tgfd < 0 || access(target, F_OK) != -1) ERRRET(EINVAL, -1); 215 if(!target || tgfd < 0) ERRRET(EINVAL, -1);
216 if(access(target, F_OK) != -1) ERRRET(EEXIST, -1);
216 char *path = NULL; 217 char *path = NULL;
217 218
218 asprintf(&path, "/proc/self/fd/%d", tgfd); 219 asprintf(&path, "/proc/self/fd/%d", tgfd);