Repository navigation
find: name the output file that -fprint, -fprint0, -fprintf and -fls cannot open - #1075
Open
andretorresdg wants to merge 1 commit into
Open
andretorresdg wants to merge 1 commit into
andretorresdg wants to merge 1 commit into
Conversation
…cannot open When the output file could not be created, the error was only the OS message, e.g. "find: No such file or directory (os error 2)", with no hint of which file was meant. GNU find names it. Prefix the path with the name_file helper that -newer and -samefile already use.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1075 +/- ##
=======================================
Coverage 92.44% 92.44%
=======================================
Files 38 38
Lines 8894 8895 +1
Branches 440 440
=======================================
+ Hits 8222 8223 +1
Misses 532 532
Partials 140 140 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Merging this PR will not alter performance1 warning
Comparing |
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.
When the output file of
-fprint,-fprint0,-fprintfor-flscannot be created, the error only had the OS message, with no hint of which file was meant:The path is now prefixed with the
name_filehelper that-newer,-newerXYand-samefilealready use (#923), so the message has the same shape as those.Closes #1070
How I tested
find_output_file_error_names_ittest intests/test_find.rscovering the four actions (fails before, passes after).cargo test,cargo fmt --all -- --check,cargo clippy --all-targets -- -D warnings.