From 2a1176a94794d7cfcf2d131807141528be964abc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Mon, 7 Feb 2022 12:56:13 +0100 Subject: [PATCH] Different check for file The ls command to check for this file will throw an error when the file does not exist. Better to simply test for the file (with size greater than zero). --- fragments/functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fragments/functions.sh b/fragments/functions.sh index ba12731..037086f 100644 --- a/fragments/functions.sh +++ b/fragments/functions.sh @@ -700,7 +700,7 @@ installPkgInZip() { archiveName="${filearray[1]}" printlog "found pkg: $archiveName" else - if ls "$tmpDir/$pkgName" ; then + if [[ -s "$tmpDir/$pkgName" ]]; then archiveName="$tmpDir/$pkgName" else # try searching for pkg