fixes dav_session_get_href() generating random names when encrypt-name is disabled

Tue, 13 Nov 2018 23:33:59 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Tue, 13 Nov 2018 23:33:59 +0100
changeset 496
5979ea04175e
parent 495
52cbd310b881
child 497
411bd1098175

fixes dav_session_get_href() generating random names when encrypt-name is disabled

libidav/session.c file | annotate | diff | comparison | revisions
--- a/libidav/session.c	Tue Nov 13 21:16:27 2018 +0100
+++ b/libidav/session.c	Tue Nov 13 23:33:59 2018 +0100
@@ -378,11 +378,12 @@
                 if(child) {
                     ucx_buffer_puts(href, util_resource_name(child->href));
                     res = child;
-                } else {
-                    //printf("random\n");
+                } else if(DAV_ENCRYPT_NAME(sn)) {
                     char *random_name = util_random_str();
                     ucx_buffer_puts(href, random_name);
                     free(random_name);
+                } else {
+                    ucx_buffer_puts(href, util_resource_name(path));
                 }
             }
             

mercurial