Skip to content

Commit e73f96e

Browse files
committed
Avoid logging warning why attempting to delete unexisting file.
1 parent 7d080ea commit e73f96e

File tree

1 file changed

+1
-0
lines changed
  • libraries/androidutils/src/main/kotlin/io/element/android/libraries/androidutils/file

1 file changed

+1
-0
lines changed

libraries/androidutils/src/main/kotlin/io/element/android/libraries/androidutils/file/File.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import java.util.Locale
2525
import java.util.UUID
2626

2727
fun File.safeDelete() {
28+
if (exists().not()) return
2829
tryOrNull(
2930
onError = {
3031
Timber.e(it, "Error, unable to delete file $path")

0 commit comments

Comments
 (0)