Function to remove invalid characters from file path
This commit is contained in:
parent
5dbaf02e33
commit
f7ce401564
1 changed files with 3 additions and 0 deletions
|
@ -488,6 +488,9 @@ class ContentManager(object):
|
|||
else:
|
||||
return re.match("^[a-z\[\]\(\) A-Z0-9_@=\.\+-/]+$", relative_path)
|
||||
|
||||
def sanitizePath(self, inner_path):
|
||||
return re.sub("[^a-z\[\]\(\) A-Z0-9_@=\.\+-/]", "", inner_path)
|
||||
|
||||
# Hash files in directory
|
||||
def hashFiles(self, dir_inner_path, ignore_pattern=None, optional_pattern=None):
|
||||
files_node = {}
|
||||
|
|
Loading…
Reference in a new issue