Skip to content
Myr

Fixed send_from_directory not rebasing to the root path. This fixes #921

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent d094d5b · Browse files · 2 files+4 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+4 added−0 removed

  • other:+4 added−0 removed

2 files+4 added−0 removed

modified:flask/helpers.py+2 added
613 unmodified lines
614 :param options: optional keyword arguments that are directly615 forwarded to :func:`send_file`.616 """617 filename = safe_join(directory, filename)618 if not os.path.isabs(filename):619 filename = os.path.join(current_app.root_path, filename)620 if not os.path.isfile(filename):621 raise NotFound()622 options.setdefault('conditional', True)623 return send_file(filename, **options)
238 unmodified lines
modified:CHANGES+2 added
16 unmodified lines
17- Fixed an issue with query parameters getting removed from requests in18 the test client when absolute URLs were requested.19- Made `@before_first_request` into a decorator as intended.20- Fixed an etags bug when sending a file streams with a name.21- Fixed `send_from_directory` not expanding to the application root path22 correctly.2324Version 0.10.125--------------26
457 unmodified lines