diff options
-rw-r--r-- | src/github/daneren2005/dsub/service/DownloadFile.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/github/daneren2005/dsub/service/DownloadFile.java b/src/github/daneren2005/dsub/service/DownloadFile.java index e59e6f12..4af85975 100644 --- a/src/github/daneren2005/dsub/service/DownloadFile.java +++ b/src/github/daneren2005/dsub/service/DownloadFile.java @@ -468,11 +468,14 @@ public class DownloadFile implements BufferFile { if (wifiLock != null) { wifiLock.release(); } - new CacheCleaner(context, DownloadService.getInstance()).cleanSpace(); - if(DownloadService.getInstance() != null) { - DownloadService.getInstance().checkDownloads(); - } - } + } + + // Only run these if not interrupted, ie: cancelled + new CacheCleaner(context, DownloadService.getInstance()).cleanSpace(); + + if(DownloadService.getInstance() != null) { + DownloadService.getInstance().checkDownloads(); + } return null; } |