dav/main.c

changeset 235
0468df02e18f
parent 230
fdcbde1d7d65
child 236
6b4ce32d0c4e
--- a/dav/main.c	Tue Mar 22 15:40:34 2016 +0100
+++ b/dav/main.c	Wed Mar 23 13:46:39 2016 +0100
@@ -611,7 +611,7 @@
     for(int i=0;i<2;i++) {
         res = dav_query(
                 sn,
-                "select - from %s with depth = %d where lastmodified > %t",
+                "select - from %s with depth = %d where iscollection or lastmodified > %t",
                 path,
                 depth,
                 t);
@@ -628,10 +628,8 @@
         return -1;
     }
     if(!recursive && res->iscollection) {
-        char *res_url = util_concat_path(sn->base_url, path);
-        fprintf(stderr, "Resource %s is a collection.\n", res_url);
+        fprintf(stderr, "Resource %s is a collection.\n", res->path);
         fprintf(stderr, "Use the -R option to download collections.\n");
-        free(res_url);
         return -1;
     }
     
@@ -664,9 +662,7 @@
     size_t outlen = strlen(out);
     // print some status message in recursive mode
     if(cmd_getoption(a, "recursive")) {
-        char *res_url = util_concat_path(res->session->base_url, res->path);
-        printf("get: %s\n", res_url);
-        free(res_url);
+        printf("get: %s\n", res->path);
     }
     
     if(res->iscollection) {

mercurial