From 24188b51c054a5f6b35e7796cd23af7fabccb101 Mon Sep 17 00:00:00 2001 From: nyne Date: Sun, 1 Dec 2024 21:10:51 +0800 Subject: [PATCH] fix copyDirectoryIsolate --- lib/utils/io.dart | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/utils/io.dart b/lib/utils/io.dart index 6cee959..12617b9 100644 --- a/lib/utils/io.dart +++ b/lib/utils/io.dart @@ -155,9 +155,7 @@ Future copyDirectory(Directory source, Directory destination) async { Future copyDirectoryIsolate( Directory source, Directory destination) async { - await Isolate.run(() async { - await copyDirectory(source, destination); - }); + await Isolate.run(() => overrideIO(() => copyDirectory(source, destination))); } String findValidDirectoryName(String path, String directory) { @@ -358,6 +356,7 @@ class _IOOverrides extends IOOverrides { return super.createFile(path); } } + } T overrideIO(T Function() f) {