diff --git a/fetch2core/src/main/java/com/tonyodev/fetch2core/StorageResolverHelper.kt b/fetch2core/src/main/java/com/tonyodev/fetch2core/StorageResolverHelper.kt index ba74873f..1b0e63e8 100644 --- a/fetch2core/src/main/java/com/tonyodev/fetch2core/StorageResolverHelper.kt +++ b/fetch2core/src/main/java/com/tonyodev/fetch2core/StorageResolverHelper.kt @@ -134,7 +134,7 @@ fun deleteFile(filePath: String, context: Context): Boolean { when { uri.scheme == "file" -> { val file = File(uri.path) - if (file.canWrite() && file.exists()) deleteFile(file) else context.contentResolver.delete(uri, null, null) > 0 + if (file.canWrite() && file.exists()) deleteFile(file) else false } uri.scheme == "content" -> { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT