This commit is contained in:
saloui 2023-06-19 11:14:54 +02:00
parent f46463b57a
commit 9fe9d4e9c7
2 changed files with 5 additions and 5 deletions

View File

@ -95,8 +95,8 @@ class LOLLMSConfig(BaseConfig):
cfg_path = config_path
if cfg_path.exists():
original_config = LOLLMSConfig(original_cfg_path,lollms_paths)
config = LOLLMSConfig(cfg_path,lollms_paths)
original_config = LOLLMSConfig(original_cfg_path, lollms_paths)
config = LOLLMSConfig(cfg_path, lollms_paths)
if "version" not in config or int(config["version"])<int(original_config["version"]):
#Upgrade old configuration files to new format
ASCIIColors.error("Configuration file is very old.\nReplacing with default configuration")
@ -104,7 +104,7 @@ class LOLLMSConfig(BaseConfig):
print(f"Added entries : {added}, removed entries:{removed}")
config.save_config(cfg_path)
else:
config = LOLLMSConfig()
config = LOLLMSConfig(lollms_paths=lollms_paths)
return config

View File

@ -47,7 +47,7 @@ class Settings:
shutil.copy(original, local)
self.cfg_path = local
self.config = LOLLMSConfig(self.cfg_path)
self.config = LOLLMSConfig(self.cfg_path, self.lollms_paths)
# load binding
self.load_binding()
@ -105,7 +105,7 @@ class Settings:
if Path(file_name).is_absolute():
self.log_file_path = Path(file_name)
else:
home_dir = Path.home()/"Documents/lollms/logs"
home_dir = self.lollms_paths.personal_path/"logs"
home_dir.mkdir(parents=True, exist_ok=True)
self.log_file_path = home_dir/file_name
if self.log_file_path.exists():