zed-industries/zed · error

Failed to restore `{name}`. It may have been permanently del

Error message

Failed to restore `{name}`. It may have been permanently deleted.

What it means

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.

Source

Thrown at crates/project_panel/src/undo.rs:863

                Some(project_path.map_or(original_name, |project_path| {
                    project_path_display(project, &project_path, path_style, cx)
                }))
            })
            .unwrap_or_else(|| "item".to_string());

        workspace
            .update(cx, |workspace, cx| {
                workspace.project().update(cx, |project, cx| {
                    project.restore_entry(worktree_id, trash_id, cx)
                })
            })
            .await
            .map_err(|err| match err.downcast_ref::<TrashRestoreError>() {
                Some(TrashRestoreError::Collision { .. }) => anyhow!(
                    "Failed to restore `{name}`. Something already exists at its original location."
                ),
                _ => anyhow!("Failed to restore `{name}`. It may have been permanently deleted."),
            })
    }

    /// Displays a notification with the provided `title` and `error`. The
    /// `error` is rendered as markdown, so file names wrapped in backticks show
    /// up as inline code.
    fn show_error(
        title: impl Into<SharedString>,
        workspace: WeakEntity<Workspace>,
        error: String,
        cx: &mut AsyncApp,
    ) {
        let title = title.into();
        workspace
            .update(cx, move |workspace, cx| {
                let notification_id =
                    NotificationId::Named(SharedString::new_static("project_panel_undo"));

View on GitHub (pinned to f4178619ac)

Solutions

  1. Recreate the file manually if needed
  2. Avoid purging trash before undoing a delete
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at crates/project_panel/src/undo.rs:863 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20). Data as JSON: /api/errors/c56fb1d395bda437. Report an issue: GitHub.