what i got so far
This commit is contained in:
@@ -23,6 +23,7 @@ import android.app.Notification
|
||||
import android.app.NotificationChannel
|
||||
import android.app.NotificationManager
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Build
|
||||
import androidx.appcompat.app.AppCompatDelegate
|
||||
import androidx.core.content.ContextCompat
|
||||
@@ -38,6 +39,7 @@ import kotlinx.coroutines.launch
|
||||
import okhttp3.Interceptor
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.Response
|
||||
import xyz.quaver.io.FileX
|
||||
import xyz.quaver.pupil.util.*
|
||||
import xyz.quaver.setClient
|
||||
import java.io.File
|
||||
@@ -91,11 +93,11 @@ class Pupil : Application() {
|
||||
|
||||
try {
|
||||
Preferences.get<String>("download_folder").also {
|
||||
if (!File(it).canWrite())
|
||||
if (!FileX(this, it).canWrite())
|
||||
throw Exception()
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Preferences.remove("dl_location")
|
||||
Preferences.remove("download_folder")
|
||||
}
|
||||
|
||||
histories = GalleryList(File(ContextCompat.getDataDir(this), "histories.json"))
|
||||
|
||||
Reference in New Issue
Block a user