File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
sqlcipher/src/main/java/net/zetetic/database/sqlcipher Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -324,19 +324,18 @@ private SQLiteDatabase getDatabaseLocked(boolean writable) {
324324 } else if (mName == null ) {
325325 db = SQLiteDatabase .create (null );
326326 } else {
327- String path = mName ;
328- if (!path .startsWith ("file:" )) {
329- path = mContext .getDatabasePath (path ).getPath ();
330- }
331327 try {
332- final File filePath = mContext .getDatabasePath (mName );
333- final String path = filePath .getPath ();
328+ String path = mName ;
329+ if (!path .startsWith ("file:" )) {
330+ path = mContext .getDatabasePath (path ).getPath ();
331+ }
334332 /*
335333 Modified by Zetetic, newer Android OS versions will create the
336334 databases directory upon installation of the APK, whereas older
337335 versions, such as some devices running API 21 the databases directory
338336 does not exist.
339337 */
338+ File filePath = new File (path );
340339 final File databasesDirectory = new File (filePath .getParent ());
341340 if (!databasesDirectory .exists ()){
342341 databasesDirectory .mkdirs ();
You can’t perform that action at this time.
0 commit comments