application/davcontroller.c

changeset 13
5a8762fcfecc
parent 12
3eb0cbab53db
child 15
78684a24dc52
--- a/application/davcontroller.c	Tue Jan 30 11:58:11 2024 +0100
+++ b/application/davcontroller.c	Tue Jan 30 13:31:25 2024 +0100
@@ -48,8 +48,12 @@
 
 
 void davbrowser_set_collection(UiObject *ui, DavBrowser *browser, DavResource *collection) {
+    if (browser->current) {
+        dav_resource_free_all(browser->current);
+    }
     ui_list_clear(browser->resources);
 
+    browser->current = collection;
     for (DavResource *res = collection->children; res; res = res->next) {
         ui_list_append(browser->resources, res);
     }
@@ -88,7 +92,7 @@
     DavBrowserQueryPath *query = data;
     DavSession *sn = query->browser->sn;
 
-    DavResource *res = dav_query(sn, "select `idav:crypto-name`,`idav:crypto-key`,D:lockdiscovery from %s with depth = 1 order by iscollection desc, name", query->path);
+    DavResource *res = dav_query(sn, "select `idav:crypto-name`,`idav:crypto-key`,D:lockdiscovery,D:getcontenttype from %s with depth = 1 order by iscollection desc, name", query->path);
     query->result = res;
 
     return 0;

mercurial