Remove exported image if it has no GPS data

This commit is contained in:
elman
2016-04-27 19:35:44 +02:00
parent d2762fae73
commit f5a624cfb2

View File

@@ -222,6 +222,9 @@ local function create_kml_file(storage, image_table, extra_data)
local convertToThumbCommand = "convert -size 96x96 "..exported_image.." -resize 92x92 -mattecolor \"#FFFFFF\" -frame 2x2 +profile \"*\" "..exportDirectory.."/"..imageFoldername.."thumb_"..filename..".jpg"
-- USE coroutine.yield. It does not block the UI
coroutine.yield("RUN_COMMAND", convertToThumbCommand)
else
-- Remove exported image if it has no GPS data
os.remove(exported_image)
end
local pattern = "[/]?([^/]+)$"