CRC workaround for older versions
This commit is contained in:
@@ -750,14 +750,19 @@ class DataDownloader extends Thread
|
|||||||
ret = check.read(buf, 0, buf.length);
|
ret = check.read(buf, 0, buf.length);
|
||||||
}
|
}
|
||||||
check.close();
|
check.close();
|
||||||
|
|
||||||
|
|
||||||
|
// NOTE: For some reason this not work properly on older Android versions (4.4 and below).
|
||||||
|
// Setting this to become a warning
|
||||||
if( check.getChecksum().getValue() != entry.getCrc() || count != entry.getSize() )
|
if( check.getChecksum().getValue() != entry.getCrc() || count != entry.getSize() )
|
||||||
{
|
{
|
||||||
File ff = new File(path);
|
//File ff = new File(path);
|
||||||
ff.delete();
|
//ff.delete();
|
||||||
Log.i("SDL", "Saving file '" + path + "' - CRC check failed, ZIP: " +
|
Log.i("SDL", "Saving file '" + path + "' - CRC check failed, ZIP: " +
|
||||||
String.format("%x", entry.getCrc()) + " actual file: " + String.format("%x", check.getChecksum().getValue()) +
|
String.format("%x", entry.getCrc()) + " actual file: " + String.format("%x", check.getChecksum().getValue()) +
|
||||||
" file size in ZIP: " + entry.getSize() + " actual size " + count );
|
" file size in ZIP: " + entry.getSize() + " actual size " + count );
|
||||||
throw new Exception();
|
Log.i("SDL", "If you still get problems try to reset the app or delete file at path " + path );
|
||||||
|
//throw new Exception();
|
||||||
}
|
}
|
||||||
} catch( Exception e ) {
|
} catch( Exception e ) {
|
||||||
Status.setText( res.getString(R.string.error_write, path) + ": " + e.getMessage() );
|
Status.setText( res.getString(R.string.error_write, path) + ": " + e.getMessage() );
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ AppName="Commander Genius"
|
|||||||
AppFullName=net.sourceforge.clonekeenplus
|
AppFullName=net.sourceforge.clonekeenplus
|
||||||
|
|
||||||
# Application version code (integer)
|
# Application version code (integer)
|
||||||
AppVersionCode=198410
|
AppVersionCode=198500
|
||||||
|
|
||||||
# Application user-visible version name (string)
|
# Application user-visible version name (string)
|
||||||
AppVersionName="1.9.8.4 Beta"
|
AppVersionName="1.9.8.4 Beta"
|
||||||
|
|||||||
Reference in New Issue
Block a user