Browse Source

Correction de bug : rétablit le songdir original après traitement des fichiers concernés

pull/47/head
Louis 11 years ago
parent
commit
099f21824c
  1. 5
      songbook_core/content/cwd.py

5
songbook_core/content/cwd.py

@ -26,11 +26,14 @@ def parse(keyword, config, argument, contentlist):
- then as a relative path to every path already present in - then as a relative path to every path already present in
config['songdir']. config['songdir'].
""" """
old_songdir = config['_songdir']
config['_songdir'] = ( config['_songdir'] = (
[os.path.relpath(argument)] + [os.path.relpath(argument)] +
[os.path.join(path, argument) for path in config['_songdir']] + [os.path.join(path, argument) for path in config['_songdir']] +
config['_songdir'] config['_songdir']
) )
return process_content(contentlist, config) processed_content = process_content(contentlist, config)
config['_songdir'] = old_songdir
return processed_content
CONTENT_PLUGINS = {'cwd': parse} CONTENT_PLUGINS = {'cwd': parse}

Loading…
Cancel
Save