Browse Source

Corrected bug when songbook path is only a file (file.sb, not dir/file.sb)

pull/54/head
Louis 11 years ago
parent
commit
fffcf3f63b
  1. 4
      songbook

4
songbook

@ -118,12 +118,12 @@ def main():
if isinstance(songbook['datadir'], basestring): if isinstance(songbook['datadir'], basestring):
songbook['datadir'] = [songbook['datadir']] songbook['datadir'] = [songbook['datadir']]
datadirs += [ datadirs += [
os.path.join(os.path.dirname(songbook_path), path) os.path.join(os.path.dirname(os.path.abspath(songbook_path)), path)
for path in songbook['datadir'] for path in songbook['datadir']
] ]
if not datadirs: if not datadirs:
# Default value # Default value
datadirs = [os.path.dirname(songbook_path)] datadirs = [os.path.dirname(os.path.abspath(songbook_path))]
songbook['datadir'] = datadirs songbook['datadir'] = datadirs
try: try:

Loading…
Cancel
Save