if (ret != THUMBNAIL_UTIL_ERROR_NONE) {
LOGE("Failed to create thumbnail. msg : %s", get_error_message(ret));
sticker_data.thumbnail_path.clear();
- } else {
- insert_sticker_data(sticker_data.file_path.c_str(), sticker_data.keyword.c_str(), sticker_data.group.c_str(), sticker_data.description.c_str(), sticker_data.thumbnail_path.c_str());
- destroy_sticker_provider_handle();
}
+ insert_sticker_data(sticker_data.file_path.c_str(), sticker_data.keyword.c_str(), sticker_data.group.c_str(), sticker_data.description.c_str(), sticker_data.thumbnail_path.c_str());
+ destroy_sticker_provider_handle();
+
if (unlink(sticker_data.file_path.c_str()) == -1)
LOGE("Failed to remove sticker file");