fixes truncate path

Thu, 28 Mar 2019 20:30:52 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Thu, 28 Mar 2019 20:30:52 +0100
changeset 548
ab46acda1066
parent 547
4a249c645ae4
child 549
af91d3c96994

fixes truncate path

dav/sync.c file | annotate | diff | comparison | revisions
--- a/dav/sync.c	Thu Mar 28 20:23:45 2019 +0100
+++ b/dav/sync.c	Thu Mar 28 20:30:52 2019 +0100
@@ -1137,7 +1137,9 @@
     
     if(issplit) {
         if(truncate_file >= 0) {
-            truncate(tmp_path, truncate_file);
+            if(truncate(local_path, truncate_file)) {
+                perror("truncate");
+            }
         }
         
         char *res_hash = sync_get_content_hash(res);

mercurial