Commit 77158fbf authored by Geoffrey Métais's avatar Geoffrey Métais

Check db folder is writable to init medialibrary

parent 8ca19844
......@@ -87,7 +87,8 @@ public class Medialibrary {
sContext = context;
File extFilesDir = context.getExternalFilesDir(null);
File dbDirectory = context.getDir("db", Context.MODE_PRIVATE);
if (extFilesDir == null || !extFilesDir.exists())
if (extFilesDir == null || !extFilesDir.exists()
|| dbDirectory == null || !dbDirectory.canWrite())
return false;
mIsInitiated = nativeInit(dbDirectory+ VLC_MEDIA_DB_NAME, extFilesDir+ THUMBS_FOLDER_NAME);
return mIsInitiated;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment