comparison libervia/backend/core/main.py @ 4179:3b95704ab777

core: fix path in `get_local_path`: `local_dir` was not used in final path, resulting in workind dir used instead or actual local path.
author Goffi <goffi@goffi.org>
date Sat, 09 Dec 2023 14:05:02 +0100
parents 02f0adc745c6
children 730f542e4ad0
comparison
equal deleted inserted replaced
4178:cf0ea77f9537 4179:3b95704ab777
906 @return: path 906 @return: path
907 """ 907 """
908 local_dir = self.memory.config_get("", "local_dir") 908 local_dir = self.memory.config_get("", "local_dir")
909 if not local_dir: 909 if not local_dir:
910 raise exceptions.InternalError("local_dir must be set") 910 raise exceptions.InternalError("local_dir must be set")
911 path_elts = [] 911 path_elts = [local_dir]
912 if component: 912 if component:
913 path_elts.append(C.COMPONENTS_DIR) 913 path_elts.append(C.COMPONENTS_DIR)
914 path_elts.append(regex.path_escape(dir_name)) 914 path_elts.append(regex.path_escape(dir_name))
915 if extra_path: 915 if extra_path:
916 path_elts.extend([regex.path_escape(p) for p in extra_path]) 916 path_elts.extend([regex.path_escape(p) for p in extra_path])