dav/sync.c

changeset 633
b7de5ecc30fa
parent 630
046b869a1c49
child 638
b3077bdb3d77
equal deleted inserted replaced
632:2e1b59290829 633:b7de5ecc30fa
1586 int ret = 0; 1586 int ret = 0;
1587 char *local_path = create_local_path(dir, res->path); 1587 char *local_path = create_local_path(dir, res->path);
1588 1588
1589 printf("delete: %s\n", res->path); 1589 printf("delete: %s\n", res->path);
1590 if(rmdir(local_path)) { 1590 if(rmdir(local_path)) {
1591 fprintf(stderr, "rmdir: %s : %s", local_path, strerror(errno)); 1591 // don't print error when dirs are not empty
1592 // because that can regulary happen, because the pull conflict
1593 // detection can prevent files from being deleted and in this case
1594 // the parent dir is not empty
1595 if(errno != ENOTEMPTY) {
1596 fprintf(stderr, "rmdir: %s : %s\n", local_path, strerror(errno));
1597 }
1592 ret = 1; 1598 ret = 1;
1593 } 1599 }
1594 1600
1595 free(local_path); 1601 free(local_path);
1596 return ret; 1602 return ret;

mercurial