mirror of
https://github.com/nextcloud/android.git
synced 2024-11-25 06:35:48 +03:00
FileContentProvider: fix crash on certain upgrades
checkIfColumnExists should not use getColumnIndexOrThrow, as it's supposed to check if the index doesn't exist Signed-off-by: Álvaro Brey Vilas <alvaro.brey@nextcloud.com>
This commit is contained in:
parent
5c649785f1
commit
b5d338fb8d
1 changed files with 1 additions and 1 deletions
|
@ -722,7 +722,7 @@ public class FileContentProvider extends ContentProvider {
|
|||
|
||||
private boolean checkIfColumnExists(SQLiteDatabase database, String table, String column) {
|
||||
Cursor cursor = database.rawQuery("SELECT * FROM " + table + " LIMIT 0", null);
|
||||
boolean exists = cursor.getColumnIndexOrThrow(column) != -1;
|
||||
boolean exists = cursor.getColumnIndex(column) != -1;
|
||||
cursor.close();
|
||||
|
||||
return exists;
|
||||
|
|
Loading…
Reference in a new issue