{"record":{"id":"96fb02306a249e20","repo":"sxyazi/yazi","slug":"failed-to-work-on-task-remote-file-has-chang","errorCode":null,"errorMessage":"Failed to work on: {task:?}: remote file has changed during upload","messagePattern":"Failed to work on: (.+?): remote file has changed during upload","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"yazi-scheduler/src/file/file.rs","lineNumber":452,"sourceCode":"\t\t\tctx!(task, Transaction::tmp(&task.target).await, \"Cannot determine temporary upload path\")?;\n\t\tlet mut rx = ctx!(\n\t\t\ttask,\n\t\t\tengine::copy_progressive(cache, &tmp, Attrs {\n\t\t\t\tmode:  Some(cha.mode),\n\t\t\t\tatime: None,\n\t\t\t\tbtime: None,\n\t\t\t\tmtime: None,\n\t\t\t})\n\t\t\t.await\n\t\t)?;\n\n\t\tloop {\n\t\t\tmatch rx.recv().await.unwrap_or(Ok(0)) {\n\t\t\t\tOk(0) => {\n\t\t\t\t\tlet cha =\n\t\t\t\t\t\tctx!(task, Self::cha(&task.target, true, None).await, \"Cannot stat original file\")?;\n\t\t\t\t\tif stamp.sig() != cha.hash_u128_str(&mut [0; 26]) {\n\t\t\t\t\t\tErr(anyhow!(\"Failed to work on: {task:?}: remote file has changed during upload\"))?;\n\t\t\t\t\t}\n\n\t\t\t\t\tctx!(task, engine::rename(&tmp, &task.target).await, \"Cannot persist uploaded file\")?;\n\n\t\t\t\t\tlet cha =\n\t\t\t\t\t\tctx!(task, Self::cha(&task.target, true, None).await, \"Cannot stat uploaded file\")?;\n\t\t\t\t\tctx!(task, Stamp::write(cha, task.target.as_url()).await)?;\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tOk(n) => self.ops.out(task.id, FileOutUploadDo::Adv(n)),\n\t\t\t\tErr(e) => ctx!(task, Err(e))?,\n\t\t\t}\n\t\t}\n\t\tOk(self.ops.out(task.id, FileOutUploadDo::Succ))\n\t}\n\n\tpub(super) async fn cha<U>(url: U, follow: bool, dent: Option<DirEntry>) -> io::Result<Cha>","sourceCodeStart":434,"sourceCodeEnd":470,"githubUrl":"https://github.com/sxyazi/yazi/blob/94abcfa92f4ad3f0a1aef6c1ea083cfb8aa6c8c2/yazi-scheduler/src/file/file.rs#L434-L470","documentation":"Error \"Failed to work on: {task:?}: remote file has changed during upload\" thrown in sxyazi/yazi.","triggerScenarios":"Thrown at yazi-scheduler/src/file/file.rs:452 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"94abcfa92f4ad3f0a1aef6c1ea083cfb8aa6c8c2","analyzedAt":"2026-08-16T09:56:24.836Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}