Open Hamid313-coder opened 4 months ago
Hi, @Hamid313-coder, do you get the same error running this example app?
Probably, the reason is a missing sink.close()
on cancel and error states in download_task package. The sink object is initialised here and there is a line of code for closing it on success.
I have no Flutter/Dart setup at the moment, neither a Windows device, but there were no issues on macOS & iOS.
When I want to cancel a download in my flutter windows app, I receive this error: [ERROR:flutter/runtime/dart_isolate.cc(1097)] Unhandled exception: PathAccessException: Cannot delete file, path = 'C:\Users\HAMID\AppData\Local\Temp/lesson2.zip' (OS Error: The process cannot access the file because it is being used by another process.
I guess maybe the file or file path is used by another isolate, so the access to file to delete it is denied.