Merge branch '0.10-maintenance'

This commit is contained in:
Armin Ronacher 2014-02-09 13:14:26 +00:00
commit 9298d89aed
3 changed files with 20 additions and 2 deletions

View file

@ -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)