Skip to content

Commit b0a637d

Browse files
committed
fix: Don't cache canceled partial downloads
Closes #21
1 parent e91266d commit b0a637d

File tree

1 file changed

+3
-0
lines changed
  • app/src/main/java/app/revenge/manager/installer/step/download/base

1 file changed

+3
-0
lines changed

app/src/main/java/app/revenge/manager/installer/step/download/base/DownloadStep.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ abstract class DownloadStep : Step() {
8686

8787
is DownloadResult.Cancelled -> {
8888
status = StepStatus.UNSUCCESSFUL
89+
if (destination.delete()) {
90+
runner.logger.i("$fileName deleted from cache due to cancellation")
91+
}
8992
throw CancellationException("$fileName download cancelled")
9093
}
9194
}

0 commit comments

Comments
 (0)