Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MRG] Normalize case for configuration paths #48

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions excalibur/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ def parameterized_config(template):
# for Flask
ALLOWED_EXTENSIONS = ['pdf', 'json']
SECRET_KEY = conf.get('webserver', 'SECRET_KEY')
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
PDFS_FOLDER = os.path.join(PROJECT_ROOT, 'www/static/uploads')
PROJECT_ROOT = os.path.normcase(os.path.dirname(os.path.abspath(__file__)))
PDFS_FOLDER = os.path.normcase(os.path.join(PROJECT_ROOT, 'www/static/uploads'))
USING_SQLITE = True if conf.get('core', 'SQL_ALCHEMY_CONN').startswith('sqlite') else False

get = conf.get
Expand Down
1 change: 1 addition & 0 deletions excalibur/www/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def workspaces(file_id):
for page in imagepaths:
imagepaths[page] = imagepaths[page].replace(
os.path.join(conf.PROJECT_ROOT, 'www'), '')
imagepaths[page] = imagepaths[page].replace(os.sep, '/')
filedims = file.filedims
imagedims = file.imagedims
detected_areas = file.detected_areas
Expand Down