set content-hash property after uploads when syncdir hashing is enabled

Sun, 07 Apr 2019 17:35:52 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sun, 07 Apr 2019 17:35:52 +0200
changeset 556
1a58014260e0
parent 555
c9ada14ee90e
child 557
90ad7324bbbc

set content-hash property after uploads when syncdir hashing is enabled

dav/sync.c file | annotate | diff | comparison | revisions
--- a/dav/sync.c	Sun Apr 07 17:33:05 2019 +0200
+++ b/dav/sync.c	Sun Apr 07 17:35:52 2019 +0200
@@ -1454,6 +1454,9 @@
         curl_easy_setopt(sn->handle, CURLOPT_VERBOSE, 1L);
         curl_easy_setopt(sn->handle, CURLOPT_STDERR, stderr);
     }
+    if(dir->hashing) {
+        sn->flags |= DAV_SESSION_STORE_HASH;
+    }
     
     DavBool restore_removed = cmd_getoption(a, "restore-removed") ? 1 : 0;
     DavBool restore_modified = cmd_getoption(a, "restore-modified") ? 1 : 0;

mercurial