# HG changeset patch # User Steve Losh # Date 1348348979 14400 # Node ID 413a89f3b8ce1b1e287c7061a5e8556c7da38e7e # Parent 8de084a9b64dfd7efde57f72ea1373243657a59d Don't match directories when filtering on file size. diff -r 8de084a9b64d -r 413a89f3b8ce ffind --- a/ffind Sat Sep 22 17:14:49 2012 -0400 +++ b/ffind Sat Sep 22 17:22:59 2012 -0400 @@ -284,7 +284,6 @@ return p - def build_type_set(types): if not types: return TYPES_ALL @@ -308,7 +307,6 @@ return result - def parse_size(size): size = size.replace(' ', '') if size else size @@ -377,6 +375,10 @@ options.larger_than = parse_size(options.larger_than) options.smaller_than = parse_size(options.smaller_than) + if options.larger_than or options.smaller_than: + # Directory sizes are not supported. + options.type = options.type - TYPES_DIR + # Go! search(query)