Fix bugs in syncback process and enhance error handling

- Resolved issues with nested orphan file removal, ensuring that both top-level and nested orphan files are correctly handled.
- Improved directory removal logic to gracefully handle cases where directories may have already been removed, preventing crashes.
- Enhanced the path scanning algorithm to accurately collect all source directories defined in the project, addressing missing paths in the syncback process.
- Updated logging to provide clearer debug information during directory scanning and error handling in the syncback operations.
This commit is contained in:
Joe 2026-02-01 19:14:12 -06:00
parent 4a66eff938
commit fe1ac1dd95
5 changed files with 145 additions and 54 deletions

View file

@ -63,7 +63,8 @@ pub fn run_rojo_syncback_clean(project_path: &Path, input_path: &Path) -> bool {
if !output.status.success() {
eprintln!(
"rojo syncback failed:\nstdout: {}\nstderr: {}",
"rojo syncback failed (exit code {:?}):\nstdout: {}\nstderr: {}",
output.status.code(),
String::from_utf8_lossy(&output.stdout),
String::from_utf8_lossy(&output.stderr)
);