Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
flask-admin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
flask-admin
Commits
e94787c6
Commit
e94787c6
authored
Dec 23, 2015
by
Arthur Bressan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes "not found" errors by not joining an empty base_path
parent
12f5d8f0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
__init__.py
flask_admin/contrib/fileadmin/__init__.py
+6
-2
No files found.
flask_admin/contrib/fileadmin/__init__.py
View file @
e94787c6
...
@@ -561,13 +561,17 @@ class BaseFileAdmin(BaseView, ActionsMixin):
...
@@ -561,13 +561,17 @@ class BaseFileAdmin(BaseView, ActionsMixin):
If the path does not exist, this will also raise a 404 exception.
If the path does not exist, this will also raise a 404 exception.
"""
"""
base_path
=
self
.
get_base_path
()
base_path
=
self
.
get_base_path
()
if
path
is
None
:
if
path
is
None
:
directory
=
base_path
directory
=
base_path
path
=
''
path
=
''
else
:
else
:
path
=
op
.
normpath
(
path
)
path
=
op
.
normpath
(
path
)
directory
=
op
.
normpath
(
self
.
_separator
.
join
([
base_path
,
path
]))
if
base_path
:
directory
=
self
.
_separator
.
join
([
base_path
,
path
])
else
:
directory
=
path
directory
=
op
.
normpath
(
directory
)
if
not
self
.
is_in_folder
(
base_path
,
directory
):
if
not
self
.
is_in_folder
(
base_path
,
directory
):
abort
(
404
)
abort
(
404
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment