From 5a5e1a0c77699db23e78820daf348743fa95a33f Mon Sep 17 00:00:00 2001 From: Joe Date: Tue, 10 Feb 2026 17:10:45 -0600 Subject: [PATCH] Enhance error handling in metadata file operations - Added calls to `unsuppress_path` in various error handling scenarios within the `JobThreadContext` to ensure paths are correctly managed when file operations fail. - Improved logging for failed write and serialization attempts, providing clearer feedback on issues encountered during metadata file processing. --- src/change_processor.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/change_processor.rs b/src/change_processor.rs index af3107ba..8f78a09a 100644 --- a/src/change_processor.rs +++ b/src/change_processor.rs @@ -249,6 +249,7 @@ impl JobThreadContext { match crate::json::to_vec_pretty_sorted(&serde_json::Value::Object(obj)) { Ok(content) => { if let Err(err) = fs::write(meta_path, &content) { + self.unsuppress_path(meta_path); log::error!( "Failed to write name to meta file {}: {}", meta_path.display(), @@ -257,6 +258,7 @@ impl JobThreadContext { } } Err(err) => { + self.unsuppress_path(meta_path); log::error!("Failed to serialize meta for name field: {}", err); } } @@ -285,6 +287,7 @@ impl JobThreadContext { // Meta file only had the name field; delete it entirely self.suppress_path_any(meta_path); if let Err(err) = fs::remove_file(meta_path) { + self.unsuppress_path_any(meta_path); log::error!( "Failed to remove empty meta file {}: {}", meta_path.display(), @@ -296,10 +299,12 @@ impl JobThreadContext { match crate::json::to_vec_pretty_sorted(&serde_json::Value::Object(obj)) { Ok(content) => { if let Err(err) = fs::write(meta_path, &content) { + self.unsuppress_path(meta_path); log::error!("Failed to write meta file {}: {}", meta_path.display(), err); } } Err(err) => { + self.unsuppress_path(meta_path); log::error!("Failed to serialize meta: {}", err); } }