Browse Source

Normalize path for windows

pull/179/head
Oliverpool 9 years ago
parent
commit
c7a55b5bc6
  1. 2
      test/test_content/test_content.py

2
test/test_content/test_content.py

@ -73,7 +73,7 @@ class FileTest(unittest.TestCase, metaclass=dynamic.DynamicTest):
"""Shorten the path relative to the `songs` directory""" """Shorten the path relative to the `songs` directory"""
if isinstance(elem, SongRenderer): if isinstance(elem, SongRenderer):
songpath = os.path.join(os.path.dirname(__file__), 'datadir', 'songs') songpath = os.path.join(os.path.dirname(__file__), 'datadir', 'songs')
return files.relpath(elem.song.fullpath, songpath) return os.path.normpath(files.relpath(elem.song.fullpath, songpath))
elif isinstance(elem, Section): elif isinstance(elem, Section):
return "{}:{}".format(elem.keyword, elem.name) return "{}:{}".format(elem.keyword, elem.name)
else: else:

Loading…
Cancel
Save