about summary refs log tree commit diff
diff options
context:
space:
mode:
authorhexcoder <hexcoder-@users.noreply.github.com>2020-01-28 23:15:06 +0100
committerGitHub <noreply@github.com>2020-01-28 23:15:06 +0100
commitb13bb64c3b0fb938e7807ab999cbb79906a8c2a4 (patch)
tree41fb32aec023c83c9d188413090589ea0a19c671
parentbb88d98ff8f8f1b1a434643ccd30dcd48b529a64 (diff)
downloadafl++-b13bb64c3b0fb938e7807ab999cbb79906a8c2a4.tar.gz
replace -maxdepth with posix -prune (portability)
-rwxr-xr-xafl-cmin2
1 files changed, 1 insertions, 1 deletions
diff --git a/afl-cmin b/afl-cmin
index e9d713aa..9179628e 100755
--- a/afl-cmin
+++ b/afl-cmin
@@ -330,7 +330,7 @@ BEGIN {
   } else {
     stat_format = "-f '%z %N'" # *BSD, MacOS
   }
-  cmdline = "cd "in_dir" && find . -maxdepth 1 -type f -exec stat "stat_format" \\{\\} \\; | sort -n | cut -d' ' -f2-"
+  cmdline = "cd "in_dir" && find . \\( ! -name . -a -type d -prune \\) -o -type f -exec stat "stat_format" \\{\\} \\; | sort -n | cut -d' ' -f2-"
   while (cmdline | getline) {
     infilesSmallToBig[i++] = $0
   }