-
-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FindFiles exits and returns no files when it can't open a directory #99
Comments
Thanks, @jreisinger! Yes, that seems a reasonable expectation. |
It seems like FindFiles should just ignore any errors encountered by |
@bitfield agree that using Thinking that we'd still want to include the permission errors in the output though (rather than completely swallowing), as this is more aligned with the default behavior of Maybe checking to see if the fs.WalkDirFunc returns The developer could always just Reject lines containing |
@parkerduckworth it's a tricky area, because one of the design goals for |
Ah, ok. Understood
… On Mar 27, 2022, at 4:43 AM, John Arundel ***@***.***> wrote:
@parkerduckworth it's a tricky area, because one of the design goals for script is to just get out of your way so that you can cook up quick hacks, and in the event of errors it should just "do the right thing", without blocking your task.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.
|
Happy to accept PRs for this. |
@bitfield great, just submitted one |
@bitfield what's the status of this? i'd be happy to pick it up if it still needs fixing |
@mahadzaryab1 I think this question is still open about the design—what's your view? |
@jreisinger as far as I know, there's no difference, hence no specific reason to change. It's just that if we were writing this function today, we would of course use the FS-based approach. And we are writing it today, in a sense, so I'm fine with the change, unless you think there's a good reason not to make it? |
This program
yields:
I expected behavior similar to
find $HOME -type f
, i.e. to return files from directories it can open.The text was updated successfully, but these errors were encountered: