From ff593a09048597bbf6bd03c5faeb2e53c2b62211 Mon Sep 17 00:00:00 2001 From: ed Date: Sat, 20 Feb 2021 19:10:16 +0000 Subject: [PATCH] fix folder tree presentation in mixed-r/w volumes --- copyparty/httpcli.py | 2 +- copyparty/web/browser.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index 740119f9..03e645c9 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -1095,7 +1095,7 @@ class HttpCli(object): ret["k" + excl] = self.gen_tree("/".join([top, excl]).strip("/"), target) try: - vn, rem = self.auth.vfs.get(top, self.uname, self.readable, self.writable) + vn, rem = self.auth.vfs.get(top, self.uname, True, False) fsroot, vfs_ls, vfs_virt = vn.ls(rem, self.uname) except: vfs_ls = [] diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index 0e44218d..32949f79 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -862,7 +862,8 @@ function autoplay_blocked() { function parsetree(res, top) { var ret = ''; for (var a = 0; a < res.a.length; a++) { - res['k' + res.a[a]] = 0; + if (res.a[a] !== '') + res['k' + res.a[a]] = 0; } delete res['a']; var keys = Object.keys(res);