]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
testprogs: Fix remove_directory()
authorAndreas Schneider <asn@samba.org>
Thu, 22 Dec 2022 12:13:54 +0000 (13:13 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 23 Dec 2022 14:35:31 +0000 (14:35 +0000)
common_test_fns.inc: line 121: [: too many arguments

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
testprogs/blackbox/common_test_fns.inc

index 68465e1e61a0f6481e1661c57c2ab3611590459a..a9e94b82e9953b1cdd61fc47e890d8150053fbba 100755 (executable)
@@ -118,7 +118,7 @@ remove_directory()
        local xdir=${1}
        shift
 
-       if [ "$xdir" == "/" ] || [ ! -d "$xdir" ] || [ ! $(ls -A "$xdir") ]; then
+       if [ "$xdir" == "/" ] || [ ! -d "$xdir" ] || [ -z "$(ls -A "$xdir")" ]; then
                return
        fi