{"record":{"id":"4be1e3019c7d4d31","repo":"zed-industries/zed","slug":"failed-to-restore-name-something-already-exis","errorCode":null,"errorMessage":"Failed to restore `{name}`. Something already exists at its original location.","messagePattern":"Failed to restore `(.+?)`\\. Something already exists at its original location\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/project_panel/src/undo.rs","lineNumber":860,"sourceCode":"                        path: relative_path.into_arc(),\n                    })\n                })();\n\n                Some(project_path.map_or(original_name, |project_path| {\n                    project_path_display(project, &project_path, path_style, cx)\n                }))\n            })\n            .unwrap_or_else(|| \"item\".to_string());\n\n        workspace\n            .update(cx, |workspace, cx| {\n                workspace.project().update(cx, |project, cx| {\n                    project.restore_entry(worktree_id, trash_id, cx)\n                })\n            })\n            .await\n            .map_err(|err| match err.downcast_ref::<TrashRestoreError>() {\n                Some(TrashRestoreError::Collision { .. }) => anyhow!(\n                    \"Failed to restore `{name}`. Something already exists at its original location.\"\n                ),\n                _ => anyhow!(\"Failed to restore `{name}`. It may have been permanently deleted.\"),\n            })\n    }\n\n    /// Displays a notification with the provided `title` and `error`. The\n    /// `error` is rendered as markdown, so file names wrapped in backticks show\n    /// up as inline code.\n    fn show_error(\n        title: impl Into<SharedString>,\n        workspace: WeakEntity<Workspace>,\n        error: String,\n        cx: &mut AsyncApp,\n    ) {\n        let title = title.into();\n        workspace\n            .update(cx, move |workspace, cx| {","sourceCodeStart":842,"sourceCodeEnd":878,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/project_panel/src/undo.rs#L842-L878","documentation":"Raised by the undo system's restore: Project::restore_entry failed with TrashRestoreError::AlreadyExists — something (a file or directory) now occupies the item's original path, so the trashed item cannot be put back. The message includes the item's display name.","triggerScenarios":"Thrown at crates/project_panel/src/undo.rs:860 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Delete or move the item currently occupying the original location","Restore to a different location"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}