593 DavResource *res = dav_query(sn, "get - from %s", path); |
593 DavResource *res = dav_query(sn, "get - from %s", path); |
594 if(!res) { |
594 if(!res) { |
595 if(sn->error = DAV_NOT_FOUND) { |
595 if(sn->error = DAV_NOT_FOUND) { |
596 res = dav_resource_new(sn, path); |
596 res = dav_resource_new(sn, path); |
597 } else { |
597 } else { |
598 fprintf(stderr, "error\n"); |
598 if(sn->errorstr) { |
|
599 fprintf(stderr, "Error: %s\n", sn->errorstr); |
|
600 } else { |
|
601 fprintf(stderr, "Error\n"); |
|
602 } |
599 return -1; |
603 return -1; |
600 } |
604 } |
601 } else if(res->iscollection) { |
605 } else if(res->iscollection) { |
602 // TODO: free res |
606 // TODO: free res |
603 char *newpath = util_concat_path(path, file); |
607 char *newpath = util_concat_path(path, file); |