From 4aa1e43bacf1d72c465c068114b59a99122d5f41 Mon Sep 17 00:00:00 2001 From: Andrey Nekrasov Date: Thu, 24 Jun 2021 15:30:19 +0300 Subject: [PATCH] [Setup] Fix default log dir path (#11856) --- .../PowerToysBootstrapper/bootstrapper/bootstrapper.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/installer/PowerToysBootstrapper/bootstrapper/bootstrapper.cpp b/installer/PowerToysBootstrapper/bootstrapper/bootstrapper.cpp index e8ad9e506e..571777adbf 100644 --- a/installer/PowerToysBootstrapper/bootstrapper/bootstrapper.cpp +++ b/installer/PowerToysBootstrapper/bootstrapper/bootstrapper.cpp @@ -168,6 +168,8 @@ int Bootstrapper(HINSTANCE hInstance) defaultInstallDir += "\\PowerToys"; } + fs::path logDir = PTSettingsHelper::get_root_save_folder_location(); + cxxopts::Options options{ "PowerToysBootstrapper" }; // clang-format off @@ -179,7 +181,7 @@ int Bootstrapper(HINSTANCE hInstance) ("start_pt", "Always launch PowerToys after the installation is complete") ("skip_dotnet_install", "Skip dotnet 3.X installation even if it's not detected") ("log_level", "Log level. Possible values: off|debug|error", cxxopts::value()->default_value("off")) - ("log_dir", "Log directory", cxxopts::value()->default_value(".")) + ("log_dir", "Log directory", cxxopts::value()->default_value(logDir.string())) ("install_dir", "Installation directory", cxxopts::value()->default_value(defaultInstallDir)) ("extract_msi", "Extract MSI to the working directory and exit. Use only if you must access MSI directly."); // clang-format on @@ -232,7 +234,6 @@ int Bootstrapper(HINSTANCE hInstance) installFolderProp = L"INSTALLFOLDER=" + installFolderProp; } - fs::path logDir = PTSettingsHelper::get_root_save_folder_location(); try { fs::path logDirArgPath = logDirArg;