sxyazi/yazi · error
Failed to retrieve file info
Error message
Failed to retrieve file info
What it means
After a create operation in bulk_create succeeds on disk, the code fetches the file's metadata via engine::file to build the succeeded list. If that metadata lookup fails — the file vanished or is not stat-able right after creation — the entry is moved to failed with "Failed to retrieve file info".
Solutions
- Re-run the bulk create for the failed entries.
- Check that nothing concurrently deletes or renames the target paths during the operation.
- Verify filesystem health/permissions on the mount holding the target.
Defensive patterns
Strategy: retry
Try / catch
// Treat as partial success: entries land in `failed`; re-run bulk_create for those entries
if !failed.is_empty() {
// inspect failed reasons and retry once after a short delay
} Prevention
- Avoid concurrent processes deleting files in the target directory.
- Refresh the folder view after bulk operations to reconcile state.
- Be cautious on network mounts where stat can transiently fail.
When it happens
Trigger: engine::file(dist) returns Err/None immediately after a successful create_dir_all/create — typically a race where the path was deleted or renamed between creation and stat.
Common situations: Another process (watcher, tmp cleaner) removes the freshly created file; the path is on a flaky/network mount; symlink created pointing at nothing with strict metadata requirements.
Related errors
AI-assisted analysis of sxyazi/yazi@5f901b886b (2026-09-02).
Data as JSON: /api/errors/2dd698dab102dba1.
Report an issue: GitHub.
Appendix: source
Thrown at yazi-actor/src/mgr/bulk_create.rs:92
failed.push((entry, anyhow!("Invalid path")));
continue;
};
let result: io::Result<()> = if entry.is_dir {
engine::create_dir_all(&dist).await
} else if let Some(parent) = dist.parent() {
engine::create_dir_all(parent).await.ok();
engine::create_new(&dist).await.map(|_| ())
} else {
Err(io::Error::other("No parent directory"))
};
if let Err(e) = result {
failed.push((entry, e.into()));
} else if let Ok(f) = engine::file(dist).await {
succeeded.push(f);
} else {
failed.push((entry, anyhow!("Failed to retrieve file info")));
}
}
if !succeeded.is_empty() {
// log_if_err!(Pubsub::pub_after_bulk_create(it)); // FIXME
FilesOp::create(succeeded);
}
drop(_permit);
if !failed.is_empty() {
Self::output_failed(failed).await?;
}
Ok(())
}
fn opener() -> Option<OpenerRuleArc> {
YAZI
.openView on GitHub (pinned to 5f901b886b)