File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -259,15 +259,15 @@ await withTaskGroup(of: Void.self) { group in
259259 fflush ( stdout)
260260 group. addTask {
261261 do {
262- let downloadName = try await downloadFile (
262+ guard let downloadName = try await downloadFile (
263263 from: portalItem. dataURL,
264264 to: destinationURL
265- )
265+ ) else { return }
266266 print ( " note: Downloaded item: \( portalItem. identifier) " )
267267 fflush ( stdout)
268268
269- await MainActor . run {
270- downloadedItems [ portalItem . identifier ] = downloadName
269+ _ = await MainActor . run {
270+ downloadedItems. updateValue ( downloadName , forKey : portalItem . identifier )
271271 }
272272 } catch {
273273 print ( " error: Error downloading item \( portalItem. identifier) : \( error. localizedDescription) " )
You can’t perform that action at this time.
0 commit comments