Check cached file size when downloading an url
In some cases cache-url fails when downloading an image and leaves an empty cached file. qemu-img then fails with "Wrong medium type" error on next run. Change-Id: I23e91c52094f27248cf8452f192ad63646051190
This commit is contained in:
parent
9ba761ef27
commit
9a5e14cbc5
@ -27,7 +27,7 @@ dest=$2
|
||||
mkdir -p $(dirname $dest)
|
||||
tmp=$(mktemp $(dirname $dest)/.download.XXXXXXXX)
|
||||
|
||||
if [ -f $dest ] ; then
|
||||
if [ -f $dest -a -s $dest ] ; then
|
||||
time_cond="-z $dest"
|
||||
success="Server copy has changed. Using server version of $url"
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user