DownloadWorkerUtil: Also delete old download directories when clearing downloads

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
Aayush Gupta
2024-05-01 19:17:55 +05:30
parent 68733e1ec1
commit 58e615befb

View File

@@ -95,6 +95,7 @@ class DownloadWorkerUtil @Inject constructor(
Log.i(TAG, "Clearing all downloads!")
downloadDao.deleteAll()
PathUtil.getDownloadDirectory(context).deleteRecursively()
PathUtil.getOldDownloadDirectories(context).forEach { it.deleteRecursively() }
}
suspend fun clearFinishedDownloads() {