This commit is contained in:
tom5079
2020-09-05 12:51:41 +09:00
parent 86d528ba13
commit 081c890b4e
9 changed files with 22 additions and 20 deletions

View File

@@ -146,7 +146,7 @@ class DownloadLocationDialogFragment : DialogFragment() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT)
context.contentResolver.takePersistableUriPermission(uri, takeFlags)
if (FileX(context, uri).canWrite())
if (kotlin.runCatching { FileX(context, uri).canWrite() }.getOrDefault(false))
Preferences["download_folder"] = uri.toString()
else {
Snackbar.make(