дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-06 01:57:13 +02:00
fix(project): ask about trust before leaving the current project (#4253)
Opening a folder in this window confirmed leaving the current project (which stops its running processes) before the trust prompt, so Don't Open left the original project without its processes. Trust is now asked first; the fallback open path follows the same order. Fixes #4160.
Цей коміт міститься в:
1 джерело
0fab45689f
коміт
6efece99a4
3 files changed
+31
-4
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import { showBackgroundTasks } from "./StatusBar";
|
||||
import { executeAction, getAction, registerActions } from "@/platform/actions";
|
||||
import { isTauri } from "@/platform/ipc";
|
||||
import { isCancelled, isTauri } from "@/platform/ipc";
|
||||
import { confirmProjectTrust } from "@/platform/projectTrust";
|
||||
import { closeProject, confirmLeaveProject, openProject, useProject } from "@/platform/project";
|
||||
import { runSearchFieldCommand, showContextMenu } from "@/ui";
|
||||
import { showCustomizeToolbar } from "./MainToolbarDialog";
|
||||
@@ -32,10 +33,12 @@ export async function openProjectDialog() {
|
||||
await executeAction("file.openProjectPath", path);
|
||||
return;
|
||||
}
|
||||
if (!(await confirmLeaveProject())) return;
|
||||
try {
|
||||
await confirmProjectTrust(path, "local");
|
||||
if (!(await confirmLeaveProject())) return;
|
||||
await openProject(path);
|
||||
} catch (e) {
|
||||
if (isCancelled(e)) return;
|
||||
notify({ level: "error", title: "Could not open project", body: e instanceof Error ? e.message : String(e) });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Заблокувати користувача