{"record":{"id":"c56fb1d395bda437","repo":"zed-industries/zed","slug":"failed-to-restore-name-it-may-have-been-perma","errorCode":null,"errorMessage":"Failed to restore `{name}`. It may have been permanently deleted.","messagePattern":"Failed to restore `(.+?)`\\. It may have been permanently deleted\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/project_panel/src/undo.rs","lineNumber":863,"sourceCode":"\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| {\n                let notification_id =\n                    NotificationId::Named(SharedString::new_static(\"project_panel_undo\"));\n","sourceCodeStart":845,"sourceCodeEnd":881,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/project_panel/src/undo.rs#L845-L881","documentation":"Raised by the undo system's restore: the trash entry for the item is gone (TrashRestoreError other than AlreadyExists), i.e. the item was permanently deleted or purged from the trash before restore could run.","triggerScenarios":"Thrown at crates/project_panel/src/undo.rs:863 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Recreate the file manually if needed","Avoid purging trash before undoing a delete"],"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-14T00:17:10.932Z"}