Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move locally imported files to filesDir instead of cacheDir and better name it #131

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import javax.inject.Singleton
@Singleton
class ImportLocalStorage @Inject constructor(@ApplicationContext private val appContext: Context) {

private val importFolder by lazy { File(appContext.cacheDir, LOCAL_COPY_FOLDER) }
private val importFolder by lazy { File(appContext.filesDir, IMPORTED_FILES) }

fun removeImportFolder() {
if (importFolder.exists()) runCatching { importFolder.deleteRecursively() }
Expand Down Expand Up @@ -67,6 +67,6 @@ class ImportLocalStorage @Inject constructor(@ApplicationContext private val app

companion object {
const val TAG = "Importation stream copy"
private const val LOCAL_COPY_FOLDER = "local_copy_folder"
private const val IMPORTED_FILES = "imported_files"
}
}
Loading