{"record":{"id":"133804131e71b3ac","repo":"uutils/coreutils","slug":"failed-to-sync-renamed-file","errorCode":null,"errorMessage":"Failed to sync renamed file","messagePattern":"Failed to sync renamed file","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/uu/shred/src/shred.rs","lineNumber":827,"sourceCode":"            }\n            match fs::rename(&last_path, &new_path) {\n                Ok(()) => {\n                    if verbose {\n                        show_error!(\n                            \"{}: {} {}\",\n                            last_path.maybe_quote().to_string(),\n                            translate!(\"shred-renamed-to\"),\n                            new_path.display().to_string()\n                        );\n                    }\n\n                    if remove_method == RemoveMethod::WipeSync {\n                        // Sync every file rename\n                        let new_file = OpenOptions::new()\n                            .write(true)\n                            .open(new_path.clone())\n                            .expect(\"Failed to open renamed file for syncing\");\n                        new_file.sync_all().expect(\"Failed to sync renamed file\");\n                    }\n\n                    last_path = new_path;\n                    break;\n                }\n                Err(e) => {\n                    let msg = translate!(\"shred-couldnt-rename\", \"file\" => last_path.maybe_quote(), \"new_name\" => new_path.quote(), \"error\" => e);\n                    show_error!(\"{msg}\");\n                    // TODO: replace with our error management\n                    std::process::exit(1);\n                }\n            }\n        }\n    }\n\n    last_path\n}\n","sourceCodeStart":809,"sourceCodeEnd":845,"githubUrl":"https://github.com/uutils/coreutils/blob/8b8cbfd51bec3a2cc5aec7d50e1c86ac83d29766/src/uu/shred/src/shred.rs#L809-L845","documentation":"Error \"Failed to sync renamed file\" thrown in uutils/coreutils.","triggerScenarios":"Occurs when shred fails to fsync a renamed file during the wiping process.","commonSituations":"I/O errors on the underlying device or filesystems not supporting sync during shred's rename phase.","solutions":["Check that the filesystem supports fsync on the renamed file and the file handle is valid.","Free disk space and verify the device is healthy, since sync failures often indicate I/O errors."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8b8cbfd51bec3a2cc5aec7d50e1c86ac83d29766","analyzedAt":"2026-08-19T21:43:27.871Z","contentChangedAt":"2026-08-19T21:43:27.871Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}