Skip to content
Snippets Groups Projects
Commit 0f81679f authored by Bob Mottram's avatar Bob Mottram
Browse files

Move only if image exists

parent 737687b8
No related branches found
No related tags found
No related merge requests found
......@@ -122,7 +122,9 @@ function pleroma_setting_emoji {
fi
wget "$image_url" -O "$image_filename"
if [ ! -f "$image_filename" ]; then
mv "${image_filename}.prev" "${image_filename}"
if [ -f "${image_filename}.prev" ]; then
mv "${image_filename}.prev" "${image_filename}"
fi
return
fi
rm "${image_filename}.prev"
......@@ -799,7 +801,9 @@ function pleroma_add_emoji {
fi
wget "$image_url" -O "$image_filename"
if [ ! -f "$image_filename" ]; then
mv "${image_filename}.prev" "${image_filename}"
if [ -f "${image_filename}.prev" ]; then
mv "${image_filename}.prev" "${image_filename}"
fi
dialog --title $"Add Custom Emoji" \
--msgbox $"Unable to download the image" 6 60
return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment