From 9ccd8bb3ea604898998f043113cc549ec8ce99b7 Mon Sep 17 00:00:00 2001 From: ed Date: Fri, 11 Oct 2024 22:06:43 +0000 Subject: [PATCH] support viewing dotfile docs; closes #104 --- copyparty/httpcli.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index 12cf4380..a9f9f5bd 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -5467,7 +5467,11 @@ class HttpCli(object): if doc: j2a["docname"] = doc doctxt = None - if next((x for x in files if x["name"] == doc), None): + dfn = lnames.get(doc.lower()) + if dfn and dfn != doc: + # found Foo but want FOO + dfn = next((x for x in files if x["name"] == doc), None) + if dfn: docpath = os.path.join(abspath, doc) sz = bos.path.getsize(docpath) if sz < 1024 * self.args.txt_max: