From dbb78705f7b9917def5eb0deaae94ce4005932e8 Mon Sep 17 00:00:00 2001 From: ed Date: Fri, 17 Oct 2025 00:12:21 +0000 Subject: [PATCH] fix textviewer with `g` permission; closes #927 textfiles can also be viewed with `foo.txt?v` for less jank --- copyparty/httpcli.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index f678b7b3..5da90a8f 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -6567,6 +6567,9 @@ class HttpCli(object): elif is_dir and not self.can_read: if use_dirkey: is_dk = True + elif self.can_get and "doc" in self.uparam: + zs = vjoin(self.vpath, self.uparam["doc"]) + "?v" + return self.redirect(zs, flavor="redirecting to", use302=True) elif not self.can_write: return self.tx_404(True)