DownloadWorkerUtil: Also delete old download directories when clearing downloads
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
@@ -95,6 +95,7 @@ class DownloadWorkerUtil @Inject constructor(
|
|||||||
Log.i(TAG, "Clearing all downloads!")
|
Log.i(TAG, "Clearing all downloads!")
|
||||||
downloadDao.deleteAll()
|
downloadDao.deleteAll()
|
||||||
PathUtil.getDownloadDirectory(context).deleteRecursively()
|
PathUtil.getDownloadDirectory(context).deleteRecursively()
|
||||||
|
PathUtil.getOldDownloadDirectories(context).forEach { it.deleteRecursively() }
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun clearFinishedDownloads() {
|
suspend fun clearFinishedDownloads() {
|
||||||
|
|||||||
Reference in New Issue
Block a user