1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-02-07 13:40:48 +00:00

shutils: fix read_tree_values

My bash fu was off on my previous list. The output of find was being
treated as a single string, rather than an array of paths; which ment
that the test that there was more than one path returned failed,
resulting in null output not just for empty directories but for
everyting.

This fixes the issue by converting find output to an array.
This commit is contained in:
Sergei Trofimov 2017-10-05 10:59:22 +01:00
parent d560aea660
commit 5c28e41677

View File

@ -221,9 +221,9 @@ read_tree_values() {
exit 1 exit 1
fi fi
PATHS=$($BUSYBOX find $PATH -follow -maxdepth $MAXDEPTH) PATHS=($($BUSYBOX find $PATH -follow -maxdepth $MAXDEPTH))
if [ ${#PATHS[@]} -gt 1 ]; then if [ ${#PATHS[@]} -gt 1 ]; then
$BUSYBOX grep -s '' $PATHS $BUSYBOX grep -s '' ${PATHS[@]}
fi fi
} }