Skip to content

Commit

Permalink
Merge pull request #7 from patdavid/master
Browse files Browse the repository at this point in the history
replaced OS separators with forward slashes "/"
  • Loading branch information
akhayyat committed Sep 19, 2015
2 parents 52720af + e196454 commit c10da10
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions page_hierarchy.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class UnexpectedException(Exception): pass
def get_path(page, settings):
''' Return the dirname relative to PAGE_PATHS prefix. '''
path = os.path.split(page.get_relative_source_path())[0] + '/'
path = path.replace( os.path.sep, '/' )
# Try to lstrip the longest prefix first
for prefix in sorted(settings['PAGE_PATHS'], key=len, reverse=True):
if not prefix.endswith('/'): prefix += '/'
Expand Down

0 comments on commit c10da10

Please sign in to comment.