dav/sync.c

changeset 608
3e4c0285a868
parent 607
5dc7fe41e8f8
child 611
a7c48e0dca88
--- a/dav/sync.c	Sat Jun 22 16:36:52 2019 +0200
+++ b/dav/sync.c	Fri Jul 12 16:59:08 2019 +0200
@@ -737,7 +737,7 @@
         UcxList *elm = res_new;
         UcxList *prev = NULL;
         UcxList *next = NULL;
-        struct stat s;
+        SYS_STAT s;
         for(;elm;elm=next) {
             DavResource *res = elm->data;
             prev = elm->prev;
@@ -758,7 +758,7 @@
             }
             
             char *local_path = util_concat_path(dir->path, local->path);
-            int staterr = stat(local_path, &s);
+            int staterr = sys_stat(local_path, &s);
             free(local_path);
             if(staterr) {
                 // origin doesn't exist or is inaccessible
@@ -845,8 +845,8 @@
                 fprintf(stderr, "Metadata update failed: %s\n", res->path);
                 sync_error++;
             } else {
-                struct stat s;
-                if(stat(local_path, &s)) {
+                SYS_STAT s;
+                if(sys_stat(local_path, &s)) {
                     fprintf(stderr, "Cannot stat file after update: %s\n", strerror(errno));
                 }
                 sync_set_metadata_from_stat(local, &s);
@@ -1066,7 +1066,7 @@
     return ret;
 }
 
-void sync_set_metadata_from_stat(LocalResource *local, struct stat *s) {
+void sync_set_metadata_from_stat(LocalResource *local, SYS_STAT *s) {
     local->last_modified = s->st_mtime;
     local->mode = s->st_mode & 07777;
     local->uid = s->st_uid;

mercurial