{"record":{"id":"2dd698dab102dba1","repo":"sxyazi/yazi","slug":"failed-to-retrieve-file-info","errorCode":null,"errorMessage":"Failed to retrieve file info","messagePattern":"Failed to retrieve file info","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"yazi-actor/src/mgr/bulk_create.rs","lineNumber":92,"sourceCode":"\t\t\t\tfailed.push((entry, anyhow!(\"Invalid path\")));\n\t\t\t\tcontinue;\n\t\t\t};\n\n\t\t\tlet result: io::Result<()> = if entry.is_dir {\n\t\t\t\tengine::create_dir_all(&dist).await\n\t\t\t} else if let Some(parent) = dist.parent() {\n\t\t\t\tengine::create_dir_all(parent).await.ok();\n\t\t\t\tengine::create_new(&dist).await.map(|_| ())\n\t\t\t} else {\n\t\t\t\tErr(io::Error::other(\"No parent directory\"))\n\t\t\t};\n\n\t\t\tif let Err(e) = result {\n\t\t\t\tfailed.push((entry, e.into()));\n\t\t\t} else if let Ok(f) = engine::file(dist).await {\n\t\t\t\tsucceeded.push(f);\n\t\t\t} else {\n\t\t\t\tfailed.push((entry, anyhow!(\"Failed to retrieve file info\")));\n\t\t\t}\n\t\t}\n\n\t\tif !succeeded.is_empty() {\n\t\t\t// log_if_err!(Pubsub::pub_after_bulk_create(it));  // FIXME\n\t\t\tFilesOp::create(succeeded);\n\t\t}\n\t\tdrop(_permit);\n\n\t\tif !failed.is_empty() {\n\t\t\tSelf::output_failed(failed).await?;\n\t\t}\n\t\tOk(())\n\t}\n\n\tfn opener() -> Option<OpenerRuleArc> {\n\t\tYAZI\n\t\t\t.open","sourceCodeStart":74,"sourceCodeEnd":110,"githubUrl":"https://github.com/sxyazi/yazi/blob/5f901b886b14de1f17460b6e52e9de5d67f8aba9/yazi-actor/src/mgr/bulk_create.rs#L74-L110","documentation":"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\".","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Treat as partial success: entries land in `failed`; re-run bulk_create for those entries\nif !failed.is_empty() {\n    // inspect failed reasons and retry once after a short delay\n}","preventionTips":["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."],"tags":["fs","bulk-create","metadata"],"backgroundTag":"stat-failed","analyzedSha":"5f901b886b14de1f17460b6e52e9de5d67f8aba9","analyzedAt":"2026-09-02T18:38:25.566Z","contentChangedAt":"2026-09-02T18:38:25.566Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}