mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Avoid logging warning why attempting to delete unexisting file.
This commit is contained in:
committed by
Benoit Marty
parent
7d080ea337
commit
e73f96eb6a
+1
@@ -25,6 +25,7 @@ import java.util.Locale
|
|||||||
import java.util.UUID
|
import java.util.UUID
|
||||||
|
|
||||||
fun File.safeDelete() {
|
fun File.safeDelete() {
|
||||||
|
if (exists().not()) return
|
||||||
tryOrNull(
|
tryOrNull(
|
||||||
onError = {
|
onError = {
|
||||||
Timber.e(it, "Error, unable to delete file $path")
|
Timber.e(it, "Error, unable to delete file $path")
|
||||||
|
|||||||
Reference in New Issue
Block a user