forked from orbit-oss/flask
Handle different sep across os
This commit is contained in:
parent
d4076cf07c
commit
e6178fe489
1 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue