This commit is contained in:
2026-01-11 00:52:54 -08:00
parent 6eb02f22b5
commit 7c1959483f
6 changed files with 51 additions and 32 deletions

View File

@@ -19,6 +19,7 @@ from pathlib import Path
from typing import Any, Dict, Iterable, Optional, Type
from SYS.logger import debug
from SYS.utils import expand_path
from Store._base import Store as BaseStore
@@ -169,8 +170,8 @@ class Store:
if not path_value:
return
temp_path = Path(str(temp_value)).expanduser().resolve()
backend_path = Path(str(path_value)).expanduser().resolve()
temp_path = expand_path(temp_value).resolve()
backend_path = expand_path(path_value).resolve()
if backend_path != temp_path:
return
@@ -230,7 +231,7 @@ class Store:
for key in list(kwargs.keys()):
if _normalize_config_key(key) in {"PATH",
"LOCATION"}:
kwargs[key] = str(Path(str(kwargs[key])).expanduser())
kwargs[key] = str(expand_path(kwargs[key]))
backend = store_cls(**kwargs)
@@ -411,7 +412,7 @@ def list_configured_backend_names(config: Optional[Dict[str, Any]]) -> list[str]
try:
temp_value = (config or {}).get("temp")
if temp_value:
temp_path = str(Path(str(temp_value)).expanduser().resolve())
temp_path = str(expand_path(temp_value).resolve())
for raw_store_type, instances in store_cfg.items():
if not isinstance(instances, dict):
continue
@@ -423,7 +424,7 @@ def list_configured_backend_names(config: Optional[Dict[str, Any]]) -> list[str]
path_value = instance_config.get("PATH") or instance_config.get("path")
if not path_value:
continue
if str(Path(str(path_value)).expanduser().resolve()) == temp_path:
if str(expand_path(path_value).resolve()) == temp_path:
if "temp" not in names:
names.append("temp")
except Exception: