You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a directory is not accessible the dta produced by WalkParallel is different from the one created by WalkDir: the unaccessible directory is not listed.
How to reproduce:
Prepare the env (I use Linux)
# create dir
mkdir imnotlisted
# make it unaccessible
sudo chmod 700 imnotlisted
sudo chown root:root imnotlisted
Using the small programm below the parallel version
I think the sequential version is the expected behavior, since there's no problem reading the directory entry from its parent, right? It's only descending into it that results in an error.
I'm not sure when I'll look into this, but a PR is welcome.
This commit fixes an inconsistency between the serial and the parallel
directory walkers around visiting a directory for which the user holds
insufficient permissions to descend into.
The serial walker does produce a successful entry for a directory that
it cannot descend into due to insufficient permissions. However, before
this change that has not been the case for the parallel walker, which
would produce an `Err` item not only when descending into a directory
that it cannot read from but also for the directory entry itself.
This change brings the behaviour of the parallel variant in line with
that of the serial one.
Fixes#1346, Closes#1365
If a directory is not accessible the dta produced by WalkParallel is different from the one created by WalkDir: the unaccessible directory is not listed.
How to reproduce:
Prepare the env (I use Linux)
Using the small programm below the parallel version
outputs:
but the sequential version
outputs
Which is the desired behaviour? In ripgrep this is not a problem.
the "small program below"
(edit: fixed small program...was all lowercase)
The text was updated successfully, but these errors were encountered: