From 01233991f34f6733a2f134f39527acc3f19910ff Mon Sep 17 00:00:00 2001 From: ed Date: Fri, 30 Aug 2024 16:08:50 +0000 Subject: [PATCH] tftp: support unmapped root --- copyparty/tftpd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/copyparty/tftpd.py b/copyparty/tftpd.py index c5c454af..cd16681c 100644 --- a/copyparty/tftpd.py +++ b/copyparty/tftpd.py @@ -403,7 +403,7 @@ class Tftpd(object): bos.stat(ap) return True except: - return False + return vpath == "/" def _p_isdir(self, vpath: str) -> bool: try: @@ -411,7 +411,7 @@ class Tftpd(object): ret = stat.S_ISDIR(st.st_mode) return ret except: - return False + return vpath == "/" def _hook(self, *a: Any, **ka: Any) -> None: src = inspect.currentframe().f_back.f_code.co_name