-
-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error downloading stream #36
Comments
It's the typical exception you receive when the destination file already exists. If you take a look on the exception message, you should have something like Can you confirm? MegaApiClient never overwrite files so you should catch this kind of exception and take appropriate actions in you code to ensure the destination file doesn't exist. |
hum, maybe you're right, is there anyway to replace the file? |
Currently there is nothing in MegaApiClient to overwrite a file (on purpose for safety reason). |
Yes you're right... what i was talking about an overload to the function DownloadFileAsync that allows to replace the files |
@silvermcd123 I understood your request about overloaded method. If you want, you can submit a PR with the changes and I'll be glad to integrate it but as I said, even with this new overloaded method, you still need to try/catch the Download method because other kind of exceptions can be raised |
em System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
em System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
em System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)
em CG.Web.MegaApiClient.MegaApiClient.SaveStream(Stream stream, String outputFile)
em CG.Web.MegaApiClient.MegaApiClient.<>c__DisplayClass54_0.b__0()
em System.Threading.Tasks.Task.InnerInvoke()
The text was updated successfully, but these errors were encountered: