dav/sync.c

changeset 633
b7de5ecc30fa
parent 630
046b869a1c49
child 638
b3077bdb3d77
--- a/dav/sync.c	Sun Aug 25 09:43:12 2019 +0200
+++ b/dav/sync.c	Sun Aug 25 10:57:33 2019 +0200
@@ -1588,7 +1588,13 @@
     
     printf("delete: %s\n", res->path);
     if(rmdir(local_path)) {
-        fprintf(stderr, "rmdir: %s : %s", local_path, strerror(errno));
+        // don't print error when dirs are not empty
+        // because that can regulary happen, because the pull conflict
+        // detection can prevent files from being deleted and in this case
+        // the parent dir is not empty
+        if(errno != ENOTEMPTY) {
+            fprintf(stderr, "rmdir: %s : %s\n", local_path, strerror(errno));
+        }
         ret = 1;
     }
     

mercurial