diff --git a/lib/common/helper/system_helper.dart b/lib/common/helper/system_helper.dart index 0c74974..306ee6a 100644 --- a/lib/common/helper/system_helper.dart +++ b/lib/common/helper/system_helper.dart @@ -255,10 +255,10 @@ foreach ($adapter in $adapterMemory) { .toUpperCase(); } - static Future openDir(path) async { + static Future openDir(path, {bool isFile = false}) async { dPrint("SystemHelper.openDir path === $path"); await Process.run( - SystemHelper.powershellPath, ["explorer.exe", "/select,\"\"$path\"\""]); + SystemHelper.powershellPath, ["explorer.exe", isFile ? "/select,${path}" : "/select,\"\"$path\"\""]); } static String getHostsFilePath() { diff --git a/lib/ui/settings/settings_ui_model.dart b/lib/ui/settings/settings_ui_model.dart index 1cc72c6..907edb3 100644 --- a/lib/ui/settings/settings_ui_model.dart +++ b/lib/ui/settings/settings_ui_model.dart @@ -231,6 +231,7 @@ class SettingsUIModel extends _$SettingsUIModel { } showLogs() async { - SystemHelper.openDir(getDPrintFile()?.absolute.path.replaceAll("/", "\\")); + SystemHelper.openDir(getDPrintFile()?.absolute.path.replaceAll("/", "\\"), + isFile: true); } }