mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Fix using {filename} on Windows
This commit is contained in:
parent
693ad3296c
commit
6852356014
1 changed files with 2 additions and 2 deletions
|
|
@ -221,11 +221,11 @@ class Content(object):
|
|||
# XXX Put this in a different location.
|
||||
if what == 'filename':
|
||||
if path.startswith('/'):
|
||||
path = path[1:]
|
||||
path = os.path.join(*path[1:].split('/'))
|
||||
else:
|
||||
# relative to the source path of this content
|
||||
path = self.get_relative_source_path(
|
||||
os.path.join(self.relative_dir, path)
|
||||
os.path.join(self.relative_dir, os.path.join(*path.split('/')))
|
||||
)
|
||||
|
||||
if path not in self._context['filenames']:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue