Repository navigation
Ls symlink fix - #8276
Merged
Merged
Ls symlink fix#8276
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #8276 +/- ##
==========================================
- Coverage 67.72% 67.71% -0.01%
==========================================
Files 621 620 -1
Lines 99312 99244 -68
==========================================
- Hits 67258 67204 -54
+ Misses 32054 32040 -14
|
Contributor
|
After your PR, is there a way to tell what the symlink is pointing to? Like I've seen some system says |
Contributor
Author
Contributor
|
Thanks for confirming @alesito85 |
Contributor
Author
|
No problem, let me know if you'd like me to check anything else. |
Contributor
|
Thanks |
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.

Description
Fixes #6706.
I took a look at this issue and it seems that the issue is because the path is canonicalized and thus derives to the target. I've tested it locally by checking if the path is a symlink and acting accordingly to not canonicalize it and it seems fine.
In current release if the target is deleted but the symlink remains and one
ls's it, it throws adirectory not founderror. But with the fix it still shows the symlink (with red background, indicating missing target).The change I've applied only triggers when
lsis done on a symlink, on all other counts it should basically do the same as before.User-Facing Changes
(List of all changes that impact the user experience here. This helps us keep track of breaking changes.)
Tests + Formatting
Don't forget to add tests that cover your changes.
Make sure you've run and fixed any issues with these commands:
cargo fmt --all -- --checkto check standard code formatting (cargo fmt --allapplies these changes)cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collectto check that you're using the standard code stylecargo test --workspaceto check that all tests passList existing symlink and target
Current
With fix
List existing symlink with missing target
Current
With fix