Compare commits
1 Commits
9aea1cbf26
...
c46458bed4
Author | SHA1 | Date | |
---|---|---|---|
c46458bed4 |
@ -110,11 +110,9 @@ image_copy() {
|
||||
if [[ ! -e "$save_path" ]]; then
|
||||
# If http, use curl to grab the image.
|
||||
if [[ "$file" =~ ^http(s|)\:\/\/ ]]; then
|
||||
|
||||
http_code=$(curl -s --write-out "%{http_code}" -o "$save_path" "$file")
|
||||
# If failure, and is not the default image, attempt to grab the default file.
|
||||
if ! http_code=$(curl -s --write-out "%{http_code}" -o "$save_path" "$file") \
|
||||
|| ( ((http_code!=200)) && [[ "$file" != "$icons_default_img" ]] \
|
||||
&& [[ "$file" != "$icons_default_source/$icons_default_img" ]] ); then
|
||||
if [[ $? -ne 0 ]] || ((http_code!=200)) && [[ "$file" != "$icons_default_img" ]]; then
|
||||
image_copy "$icons_default_img" "$file_name"
|
||||
return
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user