aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Fenoll <[email protected]>2017-12-14 16:27:35 +0100
committerPierre Fenoll <[email protected]>2018-03-14 11:41:52 +0100
commiteae6cdad41fa94547bce50a64ce398c958a8f9c5 (patch)
tree94030da505c4ba521ba58ac871446c6518134fb5
parent136105e82cff0a97a0ca653cbfee36a408260a4c (diff)
downloadkerl-eae6cdad41fa94547bce50a64ce398c958a8f9c5.tar.gz
kerl-eae6cdad41fa94547bce50a64ce398c958a8f9c5.tar.bz2
kerl-eae6cdad41fa94547bce50a64ce398c958a8f9c5.zip
In kerl line 1445:
count=$(ls -la "$1" | wc -l) ^-- SC2012: Use find instead of ls to better handle non-alphanumeric filenames.
-rwxr-xr-xkerl4
1 files changed, 2 insertions, 2 deletions
diff --git a/kerl b/kerl
index 540f4f5..fb240a0 100755
--- a/kerl
+++ b/kerl
@@ -1447,8 +1447,8 @@ is_valid_install_path()
echo "ERROR: $1 is not a directory."
return 1
else
- count=$(ls -la "$1" | wc -l)
- if [ "$count" -ne 3 ]; then
+ count=$(find "$1" | wc -l)
+ if [ "$count" -ne 1 ]; then
echo "ERROR: $1 does not appear to be an empty directory."
return 1
fi