os.path.join(*file_path.split("/")) construction drops leading slash from string thus making absolute path relative. It leads into problems in case if data_dir differs from directory where is zeronet installed.
This commit is contained in:
Sergei Bondarenko 2017-05-22 20:31:44 +03:00 committed by GitHub
parent 7900578077
commit a871b5dbe7

View file

@ -85,7 +85,7 @@ def merge(merged_path):
return False # No coffeescript compiler, skip this file return False # No coffeescript compiler, skip this file
# Replace / with os separators and escape it # Replace / with os separators and escape it
file_path_escaped = helper.shellquote(os.path.join(*file_path.split("/"))) file_path_escaped = helper.shellquote(file_path.replace(os.path.sep, "/"))
if "%s" in config.coffeescript_compiler: # Replace %s with coffeescript file if "%s" in config.coffeescript_compiler: # Replace %s with coffeescript file
command = config.coffeescript_compiler % file_path_escaped command = config.coffeescript_compiler % file_path_escaped