From 710abce288a0eca56a426a0822ec80ffc77493ae Mon Sep 17 00:00:00 2001 From: Uladzimir Karpenka Date: Tue, 2 Jun 2026 15:52:11 +0300 Subject: [PATCH] use %APPDATA%\ewsdr on Windows instead of exe directory Program Files is read-only for normal users; GetAppConfigDir(False) returns the proper per-user config location on all platforms. Co-Authored-By: Claude Sonnet 4.6 --- PlatformUtils.pas | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/PlatformUtils.pas b/PlatformUtils.pas index 70a326c..26577d9 100644 --- a/PlatformUtils.pas +++ b/PlatformUtils.pas @@ -14,9 +14,9 @@ function QtPlatformAllowsOpenGLControls: Boolean; function HasOpenGLSpectrumSwitch: Boolean; function CurrentScreenDPI: Integer; // Возвращает каталог для хранения конфигурации (с завершающим разделителем). -// macOS: ~/Library/Application Support/ewsdr/ -// Linux: ~/.config/ewsdr/ -// Windows: каталог исполняемого файла +// macOS: ~/Library/Application Support/ewsdr/ +// Linux: ~/.config/ewsdr/ +// Windows: %APPDATA%\ewsdr\ function GetAppCfgDir: string; implementation @@ -68,13 +68,9 @@ end; function GetAppCfgDir: string; begin -{$IFDEF WINDOWS} - Result := IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0))); -{$ELSE} Result := IncludeTrailingPathDelimiter(GetAppConfigDir(False)); if not DirectoryExists(Result) then ForceDirectories(Result); -{$ENDIF} end; end.