forked from orbit-oss/flask
Restore support for using pathlib.Path for static_folder.
* No longer causes AttributeError: 'PosixPath' object has no
attribute 'rstrip'.
* This was broken by e6178fe489
which was released in 1.1.2.
* Add a regression test that now passes.
See #3557.
This commit is contained in:
parent
b82cca7283
commit
7ba35c4d4f
3 changed files with 20 additions and 1 deletions
|
|
@ -980,7 +980,7 @@ class _PackageBoundObject:
|
|||
@static_folder.setter
|
||||
def static_folder(self, value):
|
||||
if value is not None:
|
||||
value = value.rstrip("/\\")
|
||||
value = os.fspath(value).rstrip(r"\/")
|
||||
self._static_folder = value
|
||||
|
||||
@property
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue