diff options
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/shell/preferences.rs | 2 | ||||
| -rw-r--r-- | src/client/shell/tests/agents_worktrees_notifications.rs | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/client/shell/preferences.rs b/src/client/shell/preferences.rs index dc6cc1ac..f657dfbf 100644 --- a/src/client/shell/preferences.rs +++ b/src/client/shell/preferences.rs @@ -54,7 +54,7 @@ pub(super) fn store(path: &Path, preferences: ClientChromePreferences) -> Result let temp_path = parent.join(temp_name); std::fs::write(&temp_path, content) .map_err(|error| format!("failed to write client shell state: {error}"))?; - crate::platform::replace_file(&temp_path, path).map_err(|error| { + std::fs::rename(&temp_path, path).map_err(|error| { let _ = std::fs::remove_file(&temp_path); format!("failed to replace client shell state: {error}") }) diff --git a/src/client/shell/tests/agents_worktrees_notifications.rs b/src/client/shell/tests/agents_worktrees_notifications.rs index 055b594d..2ccfe77b 100644 --- a/src/client/shell/tests/agents_worktrees_notifications.rs +++ b/src/client/shell/tests/agents_worktrees_notifications.rs @@ -966,7 +966,9 @@ fn worktree_create_previews_the_endpoint_owned_checkout_path() { &state.overlay, Some(ClientShellOverlay::WorktreeCreate(create)) if create.checkout_path - == "/tmp/herdr-worktrees/repo/feature-client-shell" + == std::path::Path::new("/tmp/herdr-worktrees") + .join("repo") + .join("feature-client-shell").to_string_lossy() )); let submit = state.handle_input_bytes(b"\r"); let [ClientShellAction::Endpoint { request, .. }] = &submit.actions[..] else { |
