Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

Commit

Permalink
Always set database permission
Browse files Browse the repository at this point in the history
  • Loading branch information
M66B committed Jan 25, 2014
1 parent 41deab3 commit c6b6290
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/biz/bokhorst/xprivacy/PrivacyService.java
Original file line number Diff line number Diff line change
Expand Up @@ -815,10 +815,9 @@ private static SQLiteDatabase getDatabase() {
db.endTransaction();
}

if (dbFile.exists())
Util.setPermission(dbFile.getAbsolutePath(), 0775, -1, PrivacyManager.cAndroidUid);
} else if (db.needUpgrade(2)) {
// Do nothing, done by migration

} else if (db.needUpgrade(3)) {
db.beginTransaction();
try {
Expand All @@ -831,6 +830,10 @@ private static SQLiteDatabase getDatabase() {
db.endTransaction();
}
}

if (dbFile.exists())
Util.setPermission(dbFile.getAbsolutePath(), 0775, -1, PrivacyManager.cAndroidUid);

Util.log(null, Log.WARN, "Database version=" + db.getVersion());
mDatabase = db;
}
Expand Down

0 comments on commit c6b6290

Please sign in to comment.