mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-06-09 09:57:32 +08:00
fix: Check if file exists
This commit is contained in:
parent
f0ab26db30
commit
0c28ebd4ba
@ -18,8 +18,12 @@ if [ -n "$URL" ]; then
|
||||
: "${BASE//+/ }"; printf -v BASE '%b' "${_//%/\\x}"
|
||||
BASE=$(echo "$BASE" | sed -e 's/[^A-Za-z0-9._-]/_/g')
|
||||
fi
|
||||
if [ -s "$STORAGE/$BASE.pat" ]; then
|
||||
URL="file://$STORAGE/$BASE.pat"
|
||||
if [[ "${URL,,}" != "http"* ]]; then
|
||||
if [ -s "$STORAGE/$BASE.pat" ]; then
|
||||
URL="file://$STORAGE/$BASE.pat"
|
||||
else
|
||||
error "File $STORAGE/$BASE.pat does not exist" && exit 65
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user