mirror of
https://github.com/MetaCubeX/ClashMetaForAndroid.git
synced 2024-11-22 05:16:08 +03:00
fix: fix startup crash
This commit is contained in:
parent
ecf03507e6
commit
b091a87a37
@ -38,14 +38,17 @@ class MainApplication : Application() {
|
||||
}
|
||||
|
||||
private fun extractGeoFiles() {
|
||||
val geoipFile = File(filesDir, "clash/geoip.metadb")
|
||||
val clashDir = File(filesDir, "clash")
|
||||
clashDir.mkdirs();
|
||||
|
||||
val geoipFile = File(clashDir, "geoip.metadb")
|
||||
if(!geoipFile.exists()) {
|
||||
FileOutputStream(geoipFile).use {
|
||||
assets.open("geoip.metadb").copyTo(it);
|
||||
}
|
||||
}
|
||||
|
||||
val geositeFile = File(filesDir, "clash/geosite.dat")
|
||||
val geositeFile = File(clashDir, "geosite.dat")
|
||||
if(!geositeFile.exists()) {
|
||||
FileOutputStream(geositeFile).use {
|
||||
assets.open("geosite.dat").copyTo(it);
|
||||
|
Loading…
Reference in New Issue
Block a user