# HG changeset patch # User Olaf Wintermann # Date 1530214865 -7200 # Node ID 70c7d8e437f92de98395030bda083a812fdc8c7f # Parent daea53362170dcaf147f2c943c7bf86d0b451518 fixes that decrypt-name can decrypt a path and not only the name diff -r daea53362170 -r 70c7d8e437f9 libidav/session.c --- a/libidav/session.c Thu Jun 28 20:11:53 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);