dav/sync.c

changeset 72
aac29f2e8030
parent 68
f6d3db6113d3
child 73
41e88442ad4e
--- a/dav/sync.c	Mon Dec 15 10:01:09 2014 +0100
+++ b/dav/sync.c	Tue Dec 30 13:24:03 2014 +0100
@@ -303,7 +303,7 @@
             ret = -1;
         }
     } else {
-        FILE *out = fopen(local_path, "w");
+        FILE *out = fopen(local_path, "wb");
         if(!out) {
             fprintf(stderr, "Cannot open output file: %s\n", local_path);
             free(local_path);
@@ -669,7 +669,7 @@
 
 int sync_put_resource(SyncDirectory *dir, DavResource *res, LocalResource *local) {
     char *local_path = util_concat_path(dir->path, res->path);
-    FILE *in = fopen(local_path, "r");
+    FILE *in = fopen(local_path, "rb");
     if(!in) {
         fprintf(stderr, "Cannot open file %s\n", local_path);
         free(local_path);

mercurial