diff -r 641dcc79e0ef -r 5de33c2d94c6 application/window.c --- a/application/window.c Sun Nov 10 15:30:46 2024 +0100 +++ b/application/window.c Mon Nov 11 20:45:34 2024 +0100 @@ -117,11 +117,17 @@ if(doc->loaded) { dav_resourceviewer_destroy(doc); } + + if (doc->tmp_file) { + unlink(doc->tmp_file); + free(doc->tmp_file); + } } void resourceviewer_new(DavBrowser *browser, const char *path, DavResourceViewType type) { const char *name = util_resource_name(path); UiObject *win = ui_simple_window(name, NULL); + ui_window_size(win, 600, 600); DavResourceViewer *doc = dav_resourceviewer_create(browser->sn, path, type); ui_attach_document(win->ctx, doc);