forked from orbit-oss/flask
Merge branch '0.10-maintenance'
This commit is contained in:
commit
9298d89aed
3 changed files with 20 additions and 2 deletions
|
|
@ -615,6 +615,8 @@ def send_from_directory(directory, filename, **options):
|
|||
forwarded to :func:`send_file`.
|
||||
"""
|
||||
filename = safe_join(directory, filename)
|
||||
if not os.path.isabs(filename):
|
||||
filename = os.path.join(current_app.root_path, filename)
|
||||
if not os.path.isfile(filename):
|
||||
raise NotFound()
|
||||
options.setdefault('conditional', True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue