Fix 9 ops/ bugs: symlink deref, truncation overwrite, CRLF, cross-typ natsort, perms exposure#29
Conversation
…e natsort, perms exposure - batch.rs: extract dedup_paths() so batch_delete uses original paths, not canonicalized (symlink target no longer deleted) - helpers.rs: rename path_contains_canonical → path_starts_with (name now matches behavior) - natsort.rs: add cross-type check in natsort() to match NatKeySegment::cmp ordering - search.rs: guard all 13 outcome.truncated assignments with is_none() (first-wins); strip trailing \r from CRLF files; remove #[cfg(test)] from content search functions - chunk_copy.rs: move preserve_permissions() before data write in publish_temp fallback; hash ThreadId via DefaultHasher for stable temp names; add #[cfg(unix)] guard on symlink early-return - Add 12 new tests covering dedup logic, symlink deletion, cross-type natsort, CRLF strip, truncation precedence, symlink copy preservation
There was a problem hiding this comment.
Sorry @leszek3737, you have reached your weekly rate limit of 1500000 diff characters.
Please try again later or upgrade to continue using Sourcery
There was a problem hiding this comment.
Code Review
This pull request adds Unix symlink copy support, prioritizes digits in natural sorting, and ensures the first truncation reason is preserved during file searches, which now also strip CRLF line endings. It also refactors batch deletion to avoid resolving symlinks and improves temporary file naming by hashing thread IDs. Review feedback indicates that the symlink copy logic should handle the "overwrite" parameter and return a zero size, points out O(N^2) complexity in path deduplication, and recommends cleaning up partial files if a copy operation fails.
- Symlink copy: respect overwrite param by removing dest before creating link; return 0 instead of metadata.len() - publish_temp fallback: clean up partial dest file on write/perm error to prevent AlreadyExists on retry
Uh oh!
There was an error while loading. Please reload this page.