Skip to content

Commit

Permalink
Merge pull request #131 from Infomaniak/rename-local-copy-folder
Browse files Browse the repository at this point in the history
Move locally imported files to filesDir instead of cacheDir and better name it
  • Loading branch information
sirambd authored Oct 30, 2024
2 parents d6e0072 + 7100586 commit aacc9e3
Showing 1 changed file with 2 additions and 2 deletions.
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"
}
}

0 comments on commit aacc9e3

Please sign in to comment.