From 745ce4254c646922d667ec13dd21963656405c12 Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Sun, 7 Jun 2026 15:12:59 +0300 Subject: fix: handle windows worktree paths and removal --- src/app/api/worktrees.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/app/api/worktrees.rs') diff --git a/src/app/api/worktrees.rs b/src/app/api/worktrees.rs index d6a269ca..573771e2 100644 --- a/src/app/api/worktrees.rs +++ b/src/app/api/worktrees.rs @@ -292,6 +292,22 @@ impl App { ); } + #[cfg(windows)] + { + if !params.force + && crate::worktree::checkout_has_dirty_files(&space.checkout_path).unwrap_or(false) + { + return encode_error( + id, + "dirty_worktree_requires_force", + crate::worktree::worktree_dirty_remove_message(&space.checkout_path), + ); + } + } + + #[cfg(windows)] + self.shutdown_workspace_terminal_runtimes_for_worktree_remove(ws_idx); + let command = crate::worktree::build_worktree_remove_command( &space.repo_root, &space.checkout_path, -- cgit v1.2.3