make locate and updatedb work on Windows #704
Open
sylvestre wants to merge 1 commit into
Open
Conversation
fe22da6 to
f46e955
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #704 +/- ##
==========================================
- Coverage 92.05% 92.04% -0.02%
==========================================
Files 35 35
Lines 7090 7099 +9
Branches 367 370 +3
==========================================
+ Hits 6527 6534 +7
- Misses 420 421 +1
- Partials 143 144 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
locate and updatedb were Unix-only (gated behind cfg and stubbed out on Windows). Make them cross-platform: - locate: decode raw DB entries via a platform-specific bytes_to_path (verbatim bytes on Unix, lossy UTF-8 elsewhere), use Metadata::len() instead of the unix-only size(), and a cross-platform make_symlink in tests that skips gracefully when symlink creation is unprivileged. - drop the #[cfg(unix)] gate on the locate module and the "unsupported on Windows" main stubs for locate/updatedb. - db_tests: remove #[cfg(not(windows))] gates, write updatedb output to a tempdir instead of /dev/null, and add a full updatedb->locate roundtrip test that is platform-independent.
f46e955 to
cc54615
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.