fix deleting files when canceling a task

This commit is contained in:
2024-11-07 08:49:32 +08:00
parent 5234de434a
commit e51a58ba4f

View File

@@ -90,7 +90,7 @@ class ImagesDownloadTask extends DownloadTask with _TransferSpeedMixin {
var local = LocalManager().find(id, comicType);
if (path != null) {
if (local == null) {
Directory(path!).deleteIgnoreError();
Directory(path!).deleteIgnoreError(recursive: true);
} else if (chapters != null) {
for (var c in chapters!) {
var dir = Directory(FilePath.join(path!, c));