Thu, 28 Jun 2018 21:41:05 +0200
fixes that decrypt-name can decrypt a path and not only the name
libidav/session.c | file | annotate | diff | comparison | revisions |
--- a/libidav/session.c Sun Jun 24 12:18:12 2018 +0200 +++ b/libidav/session.c Thu Jun 28 21:41:05 2018 +0200 @@ -297,7 +297,7 @@ char* dav_session_create_plain_href(DavSession *sn, char *path) { - if(!DAV_ENCRYPT_NAME(sn)) { + if(!DAV_ENCRYPT_NAME(sn) && !DAV_DECRYPT_NAME(sn)) { // non encrypted file names char *url = util_path_to_url(sn, path); char *href = dav_session_strdup(sn, util_url_path(url)); @@ -309,7 +309,7 @@ } char* dav_session_get_href(DavSession *sn, char *path) { - if(DAV_ENCRYPT_NAME(sn)) { + if(DAV_DECRYPT_NAME(sn) || DAV_ENCRYPT_NAME(sn)) { sstr_t p = sstr(path); UcxBuffer *href = ucx_buffer_new(NULL, 256, UCX_BUFFER_AUTOEXTEND); UcxBuffer *pbuf = ucx_buffer_new(NULL, 256, UCX_BUFFER_AUTOEXTEND);