mirror of
https://mirror.ghproxy.com/https://github.com/StarCitizenToolBox/app.git
synced 2024-12-22 23:23:43 +08:00
fix: open Dir
This commit is contained in:
parent
b8c4e05a32
commit
1ab785fbbc
@ -258,7 +258,7 @@ foreach ($adapter in $adapterMemory) {
|
||||
static Future openDir(path, {bool isFile = false}) async {
|
||||
dPrint("SystemHelper.openDir path === $path");
|
||||
await Process.run(
|
||||
SystemHelper.powershellPath, ["explorer.exe", isFile ? "/select,$path" : "/select,\"\"$path\"\""]);
|
||||
SystemHelper.powershellPath, ["explorer.exe", isFile ? "/select,$path" : "\"/select,\"$path\"\""]);
|
||||
}
|
||||
|
||||
static String getHostsFilePath() {
|
||||
|
@ -169,7 +169,7 @@ class HomeUI extends HookConsumerWidget {
|
||||
const SizedBox(width: 12),
|
||||
Button(
|
||||
onPressed: () =>
|
||||
SystemHelper.openDir("\"${homeState.scInstalledPath}\""),
|
||||
SystemHelper.openDir("${homeState.scInstalledPath}"),
|
||||
child: const Padding(
|
||||
padding: EdgeInsets.all(6),
|
||||
child: Icon(FluentIcons.folder_open),
|
||||
|
@ -265,7 +265,7 @@ class LocalizationUIModel extends _$LocalizationUIModel {
|
||||
|
||||
openDir(BuildContext context) async {
|
||||
showToast(context, S.current.localization_info_custom_file_instructions);
|
||||
SystemHelper.openDir("\"${_customizeDir.absolute.path}\"\\");
|
||||
SystemHelper.openDir(_customizeDir.absolute.path);
|
||||
}
|
||||
|
||||
VoidCallback? doRemoteInstall(
|
||||
|
@ -259,7 +259,7 @@ class UpgradeDialogUI extends HookConsumerWidget {
|
||||
progress.value = 0;
|
||||
if (!context.mounted) return;
|
||||
showToast(context, S.current.app_upgrade_info_run_failed);
|
||||
SystemHelper.openDir("\"$fileName\"");
|
||||
SystemHelper.openDir(fileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -361,7 +361,7 @@ class ToolsUIModel extends _$ToolsUIModel {
|
||||
}
|
||||
|
||||
openDir(path) async {
|
||||
SystemHelper.openDir("\"$path\"");
|
||||
SystemHelper.openDir(path);
|
||||
}
|
||||
|
||||
Future _showSystemInfo(BuildContext context) async {
|
||||
|
Loading…
Reference in New Issue
Block a user