Avoid logging warning why attempting to delete unexisting file.
This commit is contained in:
parent
7d080ea337
commit
e73f96eb6a
1 changed files with 1 additions and 0 deletions
|
|
@ -25,6 +25,7 @@ import java.util.Locale
|
|||
import java.util.UUID
|
||||
|
||||
fun File.safeDelete() {
|
||||
if (exists().not()) return
|
||||
tryOrNull(
|
||||
onError = {
|
||||
Timber.e(it, "Error, unable to delete file $path")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue