Check valid file size when downloading keyboard

Addresses the second part of #370
This commit is contained in:
darcywong00 2017-11-23 04:45:04 +07:00
parent 3dccc94272
commit 44deae4937

View file

@ -1284,7 +1284,7 @@ public final class KMManager {
Log.e("FD: Download failed!", "Error: " + e);
} finally {
if (ret > 0) {
if (tmpFile.exists()) {
if (tmpFile.exists() && tmpFile.length() > 0) {
if (file.exists()) {
file.delete();
}