From 9fb9ada3aa8d3098a69e0b70b442e0c1f2630c68 Mon Sep 17 00:00:00 2001 From: ed Date: Fri, 25 Aug 2023 18:33:15 +0000 Subject: [PATCH] dont whine about inaccessible root on rootless configs, and make it easier for on403 to invoke the homepage-redirect --- copyparty/httpcli.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index 506dee4a..beb5c3fc 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -843,14 +843,17 @@ class HttpCli(object): if not self.can_read and not self.can_write and not self.can_get: t = "@{} has no access to [{}]" - self.log(t.format(self.uname, self.vpath)) if "on403" in self.vn.flags: + t += " (on403)" + self.log(t.format(self.uname, self.vpath)) ret = self.on40x(self.vn.flags["on403"], self.vn, self.rem) if ret == "true": return True elif ret == "false": return False + elif ret == "home": + self.uparam["h"] = "" elif ret == "allow": self.log("plugin override; access permitted") self.can_read = self.can_write = self.can_move = True @@ -860,6 +863,7 @@ class HttpCli(object): return self.tx_404(True) else: if self.vpath: + self.log(t.format(self.uname, self.vpath)) return self.tx_404(True) self.uparam["h"] = ""