Handle different sep across os

This commit is contained in:
Frost Ming 2020-02-12 13:17:03 +08:00
parent d4076cf07c
commit e6178fe489
No known key found for this signature in database
GPG key ID: FFD6A65BB39F3FA7

View file

@ -1000,6 +1000,8 @@ class _PackageBoundObject(object):
@static_folder.setter
def static_folder(self, value):
if value is not None:
value = value.rstrip("/\\")
self._static_folder = value
@property
@ -1013,7 +1015,7 @@ class _PackageBoundObject(object):
return self._static_url_path
if self.static_folder is not None:
basename = os.path.basename(self.static_folder.rstrip("/"))
basename = os.path.basename(self.static_folder)
return ("/" + basename).rstrip("/")
@static_url_path.setter