From 0b1e5c35ac944ed3fd919fd0294f2808fc46e34b Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sun, 17 Nov 2024 20:07:35 +0800 Subject: [PATCH] bugfix --- ahserver/filestorage.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ahserver/filestorage.py b/ahserver/filestorage.py index d7f05e3..b2854df 100755 --- a/ahserver/filestorage.py +++ b/ahserver/filestorage.py @@ -88,6 +88,10 @@ class FileStorage: p = os.path.abspath(os.path.join(self.root,path)) return p + def webpath(self, path): + if path.startswith(self.root): + return path[len(self.root):] + def _name2path(self,name, userid=None): name = os.path.basename(name) paths=[191,193,197,97]