fix(files): batch folder deletion fails

Add debug logging to diagnose batch trash failures for folders.
When batch trash operations fail, the specific error was not being
logged, making it difficult to diagnose issues like #124.

- Add tracing::debug! logs for failed file and folder trash operations
  in batch_operations.rs
- Add unit tests for batch operation result handling to verify
  correct success/failure counting

Fixes #124
This commit is contained in:
BillionClaw
2026-03-17 11:21:16 +08:00
parent f6a2985dbc
commit 665220dd0b
3 changed files with 96 additions and 0 deletions
@@ -467,6 +467,7 @@ impl BatchOperationService {
result.stats.successful += 1;
}
Err(e) => {
tracing::debug!("Failed to trash file {}: {}", file_id, e);
result.failed.push((file_id, e.to_string()));
result.stats.failed += 1;
}
@@ -530,6 +531,7 @@ impl BatchOperationService {
result.stats.successful += 1;
}
Err(e) => {
tracing::debug!("Failed to trash folder {}: {}", folder_id, e);
result.failed.push((folder_id, e.to_string()));
result.stats.failed += 1;
}