diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-06-07 15:12:59 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-06-07 16:29:45 +0300 |
| commit | 745ce4254c646922d667ec13dd21963656405c12 (patch) | |
| tree | 96704b9884d95d810be16b1dad5cb48c07ccdcc8 /src/app/api | |
| parent | f61ed48eff622de4f970adff220603ea50292f07 (diff) | |
fix: handle windows worktree paths and removal
Diffstat (limited to 'src/app/api')
| -rw-r--r-- | src/app/api/worktrees.rs | 16 |
1 files changed, 16 insertions, 0 deletions
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, |
