fix SD card detecting

This commit is contained in:
tibbi 2016-11-07 23:59:08 +01:00
parent 1e1d0f8dc7
commit f2e13e9cb3

View File

@ -140,7 +140,7 @@ class Utils {
}
}
fun needsStupidWritePermissions(context: Context, path: String) = isPathOnSD(context, path) && isKitkat()
fun needsStupidWritePermissions(context: Context, path: String) = isPathOnSD(context, path) && isKitkat() && !context.getSDCardPath().isEmpty()
fun isPathOnSD(context: Context, path: String): Boolean {
return path.startsWith(context.getSDCardPath())