-
Notifications
You must be signed in to change notification settings - Fork 20
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Stack trace on 'Permission Denied' #3
Comments
Sounds like a good idea. I wonder if I should do what I'm leaning toward skipping silently since those messages always annoy the shit out of me when I use |
Hmm... yeah, it's a tradeoff, since silently skipping them could lead to a frustrating time wondering why something you know is there is not showing up. Since ffind is all about defaults that do what most people want, you're right: silent skipping with a verbose flag to do otherwise is probably the most useful route. |
What about a single |
Could do. Probably depends on whether you think the main use case is people just searching manually (in which case that's useful) or are piping the output of ffind somewhere (in which case the quite option is probably better). |
bump for quality. My thanks for your work. |
committed my initial version for this 1-year-old issue. Just print every error. @kkuchta for pipes, it's not a problem as stderr won't be piped to stdout pipe unless specified explicitly. |
FFind should probably fail a little more gracefully if it hits a directory it doesn't have the permissions to deal with.
➜ ~ mkdir foo
➜ ~ mkdir foo/blah
➜ ~ cd foo
➜ foo chmod 000 blah
➜ foo ffind whatever
Traceback (most recent call last):
File "/usr/local/bin/ffind", line 828, in
main()
File "/usr/local/bin/ffind", line 824, in main
search(query)
File "/usr/local/bin/ffind", line 481, in search
_search(query, '.', 0, get_initial_ignorers())
File "/usr/local/bin/ffind", line 478, in _search
_search(query, d, depth + 1, ignorers)
File "/usr/local/bin/ffind", line 461, in _search
contents = os.listdir(dir)
OSError: [Errno 13] Permission denied: './blah'
➜ foo
(OS X 10.8.1)
The text was updated successfully, but these errors were encountered: