File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
app/src/main/java/com/poti/android/domain/usecase/image Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import com.poti.android.core.common.constant.ImageConstants.IMAGE_EXTENSION
44import com.poti.android.domain.model.image.PresignedUploadInfo
55import com.poti.android.domain.repository.FileUploadRepository
66import com.poti.android.domain.repository.ImageRepository
7+ import timber.log.Timber
78import java.io.File
89import javax.inject.Inject
910import kotlin.coroutines.cancellation.CancellationException
@@ -59,6 +60,10 @@ class UploadImagesUseCaseV2 @Inject constructor(
5960 }
6061 }
6162
62- private fun clearDirectory () = fileUploadRepository
63- .clearDirectory().getOrThrow()
63+ private fun clearDirectory () = runCatching {
64+ fileUploadRepository.clearDirectory()
65+ .onFailure {
66+ Timber .e(it, " fail on clearDirectory" )
67+ }
68+ }
6469}
You can’t perform that action at this time.
0 commit comments