allow filename with \
This commit is contained in:
@ -10,7 +10,7 @@ import logging
|
||||
from typing import Dict, Any
|
||||
from subprocess import call
|
||||
from os import listdir, makedirs
|
||||
from os.path import dirname, join, isfile
|
||||
from os.path import dirname, join, isfile, abspath, normpath
|
||||
|
||||
from Cheetah.Template import Template as ChtTemplate
|
||||
from Cheetah.NameMapper import NotFound as CheetahNotFound
|
||||
@ -92,6 +92,21 @@ class CheetahTemplate(ChtTemplate):
|
||||
file=filename,
|
||||
searchList=[context, eosfunc, extra_context])
|
||||
|
||||
# FORK of Cheetah fonction, do not replace '\\' by '/'
|
||||
def serverSidePath(self, path=None,
|
||||
normpath=normpath,
|
||||
abspath=abspath
|
||||
):
|
||||
|
||||
if path:
|
||||
return normpath(abspath(path))
|
||||
# return normpath(abspath(path.replace("\\", '/')))
|
||||
elif hasattr(self, '_filePath') and self._filePath:
|
||||
return normpath(abspath(self._filePath))
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
|
||||
class CreoleLeader:
|
||||
def __init__(self, value, follower=None, index=None):
|
||||
|
Reference in New Issue
Block a user