--- a/dav/sync.c Tue Jun 13 21:58:29 2023 +0200 +++ b/dav/sync.c Wed Jun 14 22:55:29 2023 +0200 @@ -705,7 +705,7 @@ CxList *res_modified = cxLinkedListCreateSimple(CX_STORE_POINTERS); CxList *res_new = cxLinkedListCreateSimple(CX_STORE_POINTERS); - CxList *res_moved = cxLinkedListCreateSimple(CX_STORE_POINTERS); // type: MovedFile + CxList *res_moved = cxLinkedListCreateSimple(CX_STORE_POINTERS); // type: MovedFile* CxList *res_link = cxLinkedListCreateSimple(CX_STORE_POINTERS); CxList *res_conflict = cxLinkedListCreateSimple(CX_STORE_POINTERS); CxList *res_mkdir = cxLinkedListCreateSimple(CX_STORE_POINTERS); @@ -1733,10 +1733,10 @@ local->size = 0; // set metadata + sync_set_metadata_from_stat(local, &s); if(sync_store_metadata(dir, local_path, local, res)) { fprintf(stderr, "Cannot store metadata: %s\n", res->path); } - sync_set_metadata_from_stat(local, &s); // cleanup free(local_path); @@ -3480,6 +3480,8 @@ if(utime(path, &t)) { fprintf(stderr, "utime failed for file: %s : %s\n", path, strerror(errno)); ret = 1; + } else { + local->last_modified = f.last_modified; } } if((dir->metadata & FINFO_MODE) == FINFO_MODE && f.mode_set) { @@ -3487,6 +3489,8 @@ if(chmod(path, f.mode)) { fprintf(stderr, "chmod failed for file: %s : %s\n", path, strerror(errno)); ret = 1; + } else { + local->mode = f.mode; } } }