diff --git a/core/java/src/net/i2p/crypto/TrustedUpdate.java b/core/java/src/net/i2p/crypto/TrustedUpdate.java index 22f7609d99299e5b5912527cf776644db05e0514..d0f25aec5fe8c22adee47786214e95c2c267148b 100644 --- a/core/java/src/net/i2p/crypto/TrustedUpdate.java +++ b/core/java/src/net/i2p/crypto/TrustedUpdate.java @@ -414,8 +414,14 @@ D8usM7Dxp5yrDrCYZ5AIijc= * data was moved, and an error <code>String</code> otherwise. */ public String migrateVerified(String currentVersion, File signedFile, File outputFile) { - if (!isUpdatedVersion(currentVersion, signedFile)) - return "Downloaded version is not greater than current version"; + if (!signedFile.exists()) + return "File not found: " + signedFile.getAbsolutePath(); + if (!isUpdatedVersion(currentVersion, signedFile)) { + if ("".equals(_newVersion)) + return "Truncated or corrupt file: " + signedFile.getAbsolutePath(); + else + return "Downloaded version is not greater than current version"; + } if (!verify(signedFile)) return "Unknown signing key or corrupt file";