# HG changeset patch # User Tony Wang # Date 1397457633 -28800 # Node ID 2bac915ac93df28be6ac476690d3f87c9f5ddacc # Parent 799cd10dcfcff1924273d1e4aa1d34984932de84 fix sjl/friendly-find#3, skip "permission denied" diff -r 799cd10dcfcf -r 2bac915ac93d ffind --- a/ffind Sun Mar 23 18:41:13 2014 +0800 +++ b/ffind Mon Apr 14 14:40:33 2014 +0800 @@ -189,7 +189,7 @@ # 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 **. @@ -465,7 +465,11 @@ 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: