dav/main.c

changeset 353
e554f3d72d9e
parent 352
76bd29a11cc9
child 354
067ea2315a8a
equal deleted inserted replaced
352:76bd29a11cc9 353:e554f3d72d9e
1160 return -1; 1160 return -1;
1161 } 1161 }
1162 } else if(res->iscollection) { 1162 } else if(res->iscollection) {
1163 // TODO: free res 1163 // TODO: free res
1164 char *newpath = util_concat_path(path, name); 1164 char *newpath = util_concat_path(path, name);
1165
1166 if (!strcmp(path, newpath)) {
1167 // TODO: free res
1168 fprintf(stderr, "Cannot put file, because a collection with "
1169 "that name already exists.\n");
1170 free(newpath);
1171 return -1;
1172 }
1173
1165 path = newpath; 1174 path = newpath;
1166 res = dav_resource_new(sn, path); 1175 res = dav_resource_new(sn, path);
1167 free(newpath); 1176 free(newpath);
1168 int ret = put_file(repo, a, sn, res->path, NULL, in, len); 1177 int ret = put_file(repo, a, sn, res->path, NULL, in, len);
1169 // TODO: free res 1178 // TODO: free res

mercurial