Skip to content

Commit

Permalink
upgrade_metadata: support old-style file names
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed May 22, 2015
1 parent e748c9f commit 2a5db98
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion v7/upgrade_metadata/upgrade_metadata.plugin
Expand Up @@ -7,6 +7,6 @@ MinVersion = 7.4.0

[Documentation]
Author = Chris Warrick
Version = 0.1.1
Version = 0.1.2
Website = http://plugins.getnikola.com/#upgrade_metadata
Description = Upgrade old-style metadata
4 changes: 2 additions & 2 deletions v7/upgrade_metadata/upgrade_metadata.py
Expand Up @@ -74,8 +74,8 @@ def _execute(self, options, args):
if lang == post.default_lang:
fname = post.metadata_path
else:
fname, _ = os.path.splitext(post.translated_source_path(lang))
fname += '.meta'
meta_path = os.path.splitext(post.source_path)[0] + '.meta'
fname = utils.get_translation_candidate(post.config, meta_path, lang)

with io.open(fname, 'r', encoding='utf-8') as fh:
meta = fh.readlines()
Expand Down

0 comments on commit 2a5db98

Please sign in to comment.