From 62ca9d8fc1f6d50fb7c2a452904443a5d1ed3da9 Mon Sep 17 00:00:00 2001 From: Josh Benner Date: Fri, 30 Aug 2013 16:46:33 -0400 Subject: [PATCH] Fix filename replacement on Windows. --- pelican/contents.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pelican/contents.py b/pelican/contents.py index 900049a2..7314c13f 100644 --- a/pelican/contents.py +++ b/pelican/contents.py @@ -209,6 +209,9 @@ class Content(object): os.path.join(self.relative_dir, value) ) + # Make sure value has os-compatible path string, which is how + # it will be keyed in the context filenames dictionary. + value = os.path.join(*value.split('/')) if value in self._context['filenames']: origin = '/'.join((siteurl, self._context['filenames'][value].url))