artehe / Netimobiledevice

A C#/dotnet implementation for working with iOS devices (iPhone, iPad, iPod).
https://github.com/artehe/Netimobiledevice
MIT License
16 stars 9 forks source link

Backed up files do not end up as complete files if they are larger than 32kb #3

Closed MarkFassett closed 1 year ago

MarkFassett commented 1 year ago

In DeviceBackup.OnFileReceiving, the stream.Write() call is stomping on already downloaded data when a new part of the file comes in. All my files were capped at 32k. Seeking to the end of the stream before writing solved the issue for me. I'd put up a PR, but I'm unsure of the process.

artehe commented 1 year ago

Hey, sorry about that was a little oversight on my part trying to add some more flexibility to the backup. Please feel free to just make a PR to fix this and I'll merge it for you. Also if there's any other improvements or fixes please do make PRs for those as well.

MarkFassett commented 1 year ago

Just make a branch here? Or do I need to fork it first?

artehe commented 1 year ago

Forking it first is probably better, but to be honest I don't think it really matters. Do whatever you think is best. 😄