Don't match directories when filtering on file size.
author |
Steve Losh <steve@stevelosh.com> |
date |
Sat, 22 Sep 2012 17:22:59 -0400 |
parents |
8de084a9b64d
|
children |
3e4cf205210b
|
branches/tags |
(none) |
files |
ffind |
Changes
--- 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)