Merge pull request #51 from LonamiWebs/master

Fixed #50 for reals
This commit is contained in:
Tibor Kaputa 2016-11-10 20:44:07 +01:00 committed by GitHub
commit 401569043a

View file

@ -171,7 +171,9 @@ class Utils {
}
fun isShowingWritePermissions(activity: Activity, file: File): Boolean {
return if (needsStupidWritePermissions(activity, file.absolutePath) && !file.canWrite() && Config.newInstance(activity).treeUri.isEmpty()) {
return if ((needsStupidWritePermissions(activity, file.absolutePath) &&
!file.canWrite()) ||
Config.newInstance(activity).treeUri.isEmpty()) {
WritePermissionDialog(activity, object : WritePermissionDialog.OnWritePermissionListener {
override fun onConfirmed() {
val intent = Intent(Intent.ACTION_OPEN_DOCUMENT_TREE)