-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
walkdir: avoid symlink loops when
follow_symlinks == false
(#35006)
* walkdir: avoid symlink loops when `follow_symlinks == false` Because `isdir()` attempts to dereference symlinks, attempting to `walkdir()` trees that contain symlink loops errors out. This change modifies `walkdir()` to treat all symlinks as files when `follow_symlinks == false`. * rm: When checking `filemode()`, use `lstat()` to avoid following symlinks (cherry picked from commit 178ac97)
- Loading branch information
1 parent
4e11ce9
commit 5cf6725
Showing
2 changed files
with
43 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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