Skip to content

Commit

Permalink
fix #3, skip "permission denied"
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwjfy committed Apr 14, 2014
1 parent 0a3c181 commit 0dc718e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ffind
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def compile_git(line):
# If you can't tell what the hell this means you're not alone, because git's
# documentation is fucking inscrutable. Here's what I've come up with from
# trial and error:
#
#
# 0. Patterns ending in a slash will only match directories, and then you
# can ignore that slash for the rest of these rules.
# 1. Patterns are shell globs, except * doesn't match / and there's no **.
Expand Down Expand Up @@ -465,7 +465,11 @@ def match(query, path, basename):
def _search(query, dir, depth, ignorers):
ignorers = ignorers + parse_ignore_files(dir) + parse_ignore_args()

contents = os.listdir(dir)
try:
contents = os.listdir(dir)
except OSError:
err('Error: `' + dir + '`: Permission denied')
return
next = []

for item in contents:
Expand Down

0 comments on commit 0dc718e

Please sign in to comment.