Small fix to in-apk asset data unpacker
This commit is contained in:
@@ -8,7 +8,7 @@ if [ -d "project/jni/application/src/AndroidData" ] ; then
|
||||
for F in project/assets/*; do
|
||||
if [ `cat $F | wc -c` -gt 1000000 ] ; then
|
||||
echo "The file $F is bigger than 1 megabyte - splitting it into smaller chunks"
|
||||
split -b 1000000 -d $F $F && rm $F || { echo "Error: 'split' command not installed" ; exit 1 ; }
|
||||
split -b 1000000 -a 3 -d $F $F && rm $F || { echo "Error: 'split' command not installed" ; exit 1 ; }
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
@@ -317,7 +317,7 @@ class DataDownloader extends Thread
|
||||
stream1.close();
|
||||
} catch( Exception e ) {
|
||||
try {
|
||||
stream1 = Parent.getAssets().open(url + "00");
|
||||
stream1 = Parent.getAssets().open(url + "000");
|
||||
stream1.close();
|
||||
} catch( Exception ee ) {
|
||||
Log.i("SDL", "Failed to open file in assets: " + url);
|
||||
@@ -367,8 +367,8 @@ class DataDownloader extends Thread
|
||||
while( true )
|
||||
{
|
||||
try {
|
||||
// Make string ".zip00", ".zip01" etc for multipart archives
|
||||
String url1 = url + String.format("%02d", multipartCounter);
|
||||
// Make string ".zip000", ".zip001" etc for multipart archives
|
||||
String url1 = url + String.format("%03d", multipartCounter);
|
||||
CountingInputStream stream1 = new CountingInputStream(Parent.getAssets().open(url1), 8192);
|
||||
while( stream1.skip(65536) > 0 ) { };
|
||||
totalLen += stream1.getBytesRead();
|
||||
|
||||
Reference in New Issue
Block a user