libidav/resource.c

branch
dav-2
changeset 921
3ffee649f0b1
parent 920
92fcd6a8cf9e
--- a/libidav/resource.c	Wed Jul 01 21:09:22 2026 +0200
+++ b/libidav/resource.c	Thu Jul 02 20:50:47 2026 +0200
@@ -1179,7 +1179,7 @@
     }
 }
 
-DavResource* dav_create_child(DavResource *parent, char *name) {
+DavResource* dav_create_child(DavResource *parent, const char *name) {
     DavResource *res = dav_resource_new_child(parent->session, parent, name);
     if(dav_create(res)) {
         dav_resource_free(res);
@@ -1335,7 +1335,7 @@
     }
 }
 
-static int dav_cp_mv_url(DavResource *res, char *desturl, _Bool copy, _Bool override) {
+static int dav_cp_mv_url(DavResource *res, const char *desturl, _Bool copy, _Bool override) {
     DavSession *sn = res->session;
     CURL *handle = sn->handle;
     util_set_url(sn, dav_resource_get_href(res));
@@ -1355,7 +1355,7 @@
     }
 }
 
-static int dav_cp_mv(DavResource *res, char *newpath, _Bool copy, _Bool override) {
+static int dav_cp_mv(DavResource *res, const char *newpath, _Bool copy, _Bool override) {
     char *dest = dav_session_get_href(res->session, newpath);
     char *desturl = util_get_url(res->session, dest);
     dav_session_free(res->session, dest);
@@ -1365,27 +1365,27 @@
     return ret;
 }
 
-int dav_copy(DavResource *res, char *newpath) {
+int dav_copy(DavResource *res, const char *newpath) {
     return dav_cp_mv(res, newpath, true, false);
 }
 
-int dav_move(DavResource *res, char *newpath) {
+int dav_move(DavResource *res, const char *newpath) {
     return dav_cp_mv(res, newpath, false, false);
 }
 
-int dav_copy_o(DavResource *res, char *newpath, DavBool override) {
+int dav_copy_o(DavResource *res, const char *newpath, DavBool override) {
     return dav_cp_mv(res, newpath, true, override);
 }
 
-int dav_move_o(DavResource *res, char *newpath, DavBool override) {
+int dav_move_o(DavResource *res, const char *newpath, DavBool override) {
     return dav_cp_mv(res, newpath, false, override);
 }
 
-int dav_copyto(DavResource *res, char *url, DavBool override) {
+int dav_copyto(DavResource *res, const char *url, DavBool override) {
     return dav_cp_mv_url(res, url, true, override);
 }
 
-int dav_moveto(DavResource *res, char *url, DavBool override) {
+int dav_moveto(DavResource *res, const char *url, DavBool override) {
     return dav_cp_mv_url(res, url, false, override);
 }
 

mercurial