Skip to content

Commit

Permalink
If the PATH settings is set to a non-absolute path, then use normaliz…
Browse files Browse the repository at this point in the history
…e it relative to the settings file. This should probably be done for other settings aswell
  • Loading branch information
Rory McCann committed Jun 12, 2011
1 parent 83a61da commit fee2b50
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pelican/settings.py
Expand Up @@ -74,5 +74,11 @@ def read_settings(filename):
else:
log.warn("LOCALE option doesn't contain a correct value")

# Make the paths relative to the settings file
for path in ['PATH']:
if path in context:
if not os.path.isabs(context[path]):
context[path] = os.path.abspath(os.path.normpath(os.path.join(os.path.dirname(filename), context[path])))

# set the locale
return context

0 comments on commit fee2b50

Please sign in to comment.