fix: icloud upload (#267)

This commit is contained in:
lollipopkit
2024-02-02 22:50:27 +08:00
parent 991189dbca
commit 4d78f1b11a

View File

@@ -71,6 +71,7 @@ abstract final class ICloud {
String? localPath, String? localPath,
}) async { }) async {
final completer = Completer<ICloudErr?>(); final completer = Completer<ICloudErr?>();
try {
await ICloudStorage.download( await ICloudStorage.download(
containerId: _containerId, containerId: _containerId,
relativePath: relativePath, relativePath: relativePath,
@@ -85,6 +86,10 @@ abstract final class ICloud {
); );
}, },
); );
} catch (e, s) {
_logger.warning('Download $relativePath failed', e, s);
completer.complete(ICloudErr(type: ICloudErrType.generic, message: '$e'));
}
return completer.future; return completer.future;
} }