1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-04 02:09:35 +02:00

archive processing has been fixed

This commit is contained in:
Nikolay Pultsin 2010-12-17 04:44:05 +00:00
parent a6c3270553
commit 95849ddc7f
19 changed files with 47 additions and 63 deletions

View file

@ -60,7 +60,7 @@ public final class SQLiteBooksDatabase extends BooksDatabase {
private void migrate(Context context) {
final int version = myDatabase.getVersion();
final int currentVersion = 11;
final int currentVersion = 12;
if (version >= currentVersion) {
return;
}
@ -91,6 +91,8 @@ public final class SQLiteBooksDatabase extends BooksDatabase {
updateTables9();
case 10:
updateTables10();
case 11:
updateTables11();
}
myDatabase.setTransactionSuccessful();
myDatabase.endTransaction();
@ -568,7 +570,7 @@ public final class SQLiteBooksDatabase extends BooksDatabase {
final String[] parameters = { null };
FileInfo current = null;
for (ZLFile f : fileStack) {
parameters[0] = f.getName(false);
parameters[0] = f.getLongName();
final Cursor cursor = myDatabase.rawQuery(
(current == null) ?
"SELECT file_id,size FROM Files WHERE name = ?" :
@ -1113,4 +1115,8 @@ public final class SQLiteBooksDatabase extends BooksDatabase {
"CREATE TABLE IF NOT EXISTS Favorites(" +
"book_id INTEGER UNIQUE NOT NULL REFERENCES Books(book_id))");
}
private void updateTables11() {
myDatabase.execSQL("UPDATE Files SET size = size + 1");
}
}