From 0c62384c2f90b615dcca25195c901f870e8a5b01 Mon Sep 17 00:00:00 2001 From: Matteo Rossini Date: Fri, 3 May 2013 17:41:27 +0200 Subject: [PATCH] Fix an error when a folder is missing in the slackware mirror (as /testing). --- src/slackpkgplus.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/slackpkgplus.sh b/src/slackpkgplus.sh index e890e03..1ae73e4 100755 --- a/src/slackpkgplus.sh +++ b/src/slackpkgplus.sh @@ -84,7 +84,11 @@ if [ "$SLACKPKGPLUS" = "on" ];then if echo $URLFILE | grep -q "^file://" ; then URLFILE=${URLFILE:6} - cp -v $URLFILE $2 + if [ -f $URLFILE ];then + cp -v $URLFILE $2 + else + return 1 + fi else $DOWNLOADER $2 $URLFILE fi