fix: Tighten invalid file detection
This commit is contained in:
parent
41a3b86cab
commit
48c38ea62d
1 changed files with 1 additions and 1 deletions
|
@ -51,7 +51,7 @@ do
|
||||||
echo "$id $avatar"
|
echo "$id $avatar"
|
||||||
sudo -u $user curl "$avatar" -s -o "$k_photo"
|
sudo -u $user curl "$avatar" -s -o "$k_photo"
|
||||||
#If the file is a valid picture (not empty, not text)
|
#If the file is a valid picture (not empty, not text)
|
||||||
if file "$k_photo" | grep -q -v -e "text" -e "Empty"
|
if file "$k_photo" | grep -q -v -e "text" -e "empty" -e "symbolic link" -e "directory"
|
||||||
then
|
then
|
||||||
#Also fetch for thumb/micro and resize
|
#Also fetch for thumb/micro and resize
|
||||||
#As the photo is the largest version we have, we will use it as the base, and leave it last to convert
|
#As the photo is the largest version we have, we will use it as the base, and leave it last to convert
|
||||||
|
|
Loading…
Add table
Reference in a new issue