From 9cc7bb231dbfeb4e3be914f105562a42a93a92e1 Mon Sep 17 00:00:00 2001 From: Ander Punnar Date: Sun, 5 Jun 2022 22:59:39 +0300 Subject: [PATCH] __find_exec: make explorer faster Directories with lots of files can generate huge explorer output, which isn't actually what we want. We just want to know if directory contains anything which might need -exec action and first match is good enough. Additionally, sometimes, with huge output explorer just died. Didn't spend too much time debugging this, because I was already annoyed by time it took to generate and move explorer output. --- type/__find_exec/explorer/find | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/type/__find_exec/explorer/find b/type/__find_exec/explorer/find index 9aa8a9ac8..b7040b53e 100755 --- a/type/__find_exec/explorer/find +++ b/type/__find_exec/explorer/find @@ -38,4 +38,4 @@ do done \ < "$__object/parameter/exp" -eval "$@" +eval "$* | sed 1q"