feat: platform-dependent config path (APPDATA on Windows)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,11 +1,19 @@
|
||||
"""Konfiguration aus TOML-Datei mit sinnvollen Defaults."""
|
||||
|
||||
import os
|
||||
import sys
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
import tomllib
|
||||
|
||||
|
||||
DEFAULT_CONFIG_PATH = Path.home() / ".config" / "whisper-local" / "config.toml"
|
||||
def _default_config_path() -> Path:
|
||||
if sys.platform == "win32":
|
||||
return Path(os.environ.get("APPDATA", "")) / "whisper-local" / "config.toml"
|
||||
return Path.home() / ".config" / "whisper-local" / "config.toml"
|
||||
|
||||
|
||||
DEFAULT_CONFIG_PATH = _default_config_path()
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
Reference in New Issue
Block a user