fix dav-sync push not deleting files

Fri, 12 Apr 2019 11:06:04 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Fri, 12 Apr 2019 11:06:04 +0200
changeset 565
26898e00ddff
parent 564
fb482734e429
child 566
9a88920b15d8

fix dav-sync push not deleting files

dav/sync.c file | annotate | diff | comparison | revisions
--- a/dav/sync.c	Fri Apr 12 10:54:47 2019 +0200
+++ b/dav/sync.c	Fri Apr 12 11:06:04 2019 +0200
@@ -3551,7 +3551,7 @@
             } 
         }
 
-        if(nullstrcmp(etag, local_res->etag)) {
+        if(!nullstrcmp(etag, local_res->etag)) {
             // local resource metadata == remote resource metadata
             // resource can be deleted
             printf("delete: %s\n", res->path);
@@ -3574,6 +3574,8 @@
                 (*counter)++;
             }
         }
+        // else TODO: should we inform the user that the file was modified on
+        // the server and delete was skipped?
     }
     
     // cleanup

mercurial