From 37de0cc7b0eeeefcc25173913faaefa2a7673d2c Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Sun, 11 Sep 2022 14:39:24 +0200 Subject: rename force update to verify, reorder updates, return rename retval --- src/toast.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/toast.c') diff --git a/src/toast.c b/src/toast.c index c054e2f..0d3ac3a 100644 --- a/src/toast.c +++ b/src/toast.c @@ -149,7 +149,7 @@ void setLocalRevision(char* dir, int rev) return; // cleanup legacy behavior - { + { char* old_revision_path = malloc(strlen(revision_path) + strlen(OLD_TOAST_LOCAL_REVISION_PATH)); strcpy(old_revision_path, revision_path); @@ -542,12 +542,12 @@ int applyObject(char* path, struct file_info* info) char* buf_file = malloc(len); snprintf(buf_file, len, "%s%s%s", path, OS_PATH_SEP, file); - rename(buf_obj, buf_file); + int retval = rename(buf_obj, buf_file); free(buf_obj); free(buf_file); - return 0; + return retval; } /** -- cgit v1.2.3