fix: Task 14 완료 - LunaticLauncher 외부 저장소 폴백 및 Picasso 캐시 크기 수정
- LunaticLauncher.kt onCreate(): * 하드코딩된 /storage/emulated/0/... 로그 경로 접근 실패 또는 권한 부족 시 getExternalFilesDir(null)/logs로 안전 폴백하도록 try-catch 보강 * Picasso OkHttp 캐시 크기 계산 오류(1024L * 1024 * 1024 * 6 = 6GB)를 주석 의도대로 60L * 1024 * 1024(60MB)로 수정 - TODO.md: 3-5 항목 완료 처리 - 검증: ./gradlew :app:compileDebugKotlin 빌드 성공 확인 (2s)
This commit is contained in:
@@ -117,18 +117,21 @@ prefs:
|
||||
privateCompletedDir = File(getExternalFilesDir(null), "completed_torrents")
|
||||
PrefHelper.initialize(this)
|
||||
Base64ImageCache.init(this)
|
||||
val dir = File("/storage/emulated/0/bums_ob/BUM'S PACED /scraped/logs")
|
||||
///BUM'S PACED/pdfs
|
||||
if (!dir.exists()) {
|
||||
dir.mkdirs()
|
||||
} else {
|
||||
// dir.listFiles().forEach { Blog.LOGE("child -> ${it.absolutePath}") }
|
||||
val dir = try {
|
||||
val externalDir = File("/storage/emulated/0/bums_ob/BUM'S PACED /scraped/logs")
|
||||
if (externalDir.exists() || externalDir.mkdirs()) {
|
||||
externalDir
|
||||
} else {
|
||||
File(getExternalFilesDir(null), "logs").apply { mkdirs() }
|
||||
}
|
||||
} catch (_: Exception) {
|
||||
File(getExternalFilesDir(null), "logs").apply { mkdirs() }
|
||||
}
|
||||
mHourlyLogWriter = HourlyLogWriter(dir)
|
||||
val logging = HttpLoggingInterceptor().apply {
|
||||
level = HttpLoggingInterceptor.Level.NONE
|
||||
}
|
||||
val cacheSize = 1024L * 1024 * 1024 * 6 // 60MB
|
||||
val cacheSize = 60L * 1024 * 1024 // 60MB
|
||||
val cache = Cache(File(this.filesDir, "picasso-cache"), cacheSize)
|
||||
val okHttpClient = OkHttpClient.Builder()
|
||||
.cache(cache)
|
||||
|
||||
Reference in New Issue
Block a user