DjScribbles / GamePipe

An application that automates the movement of Steam games from drive to drive or computer to computer
GNU General Public License v2.0
196 stars 12 forks source link

GamePipe crashes when moving corrupt files #18

Closed opcon closed 7 years ago

opcon commented 7 years ago

I've been using GamePipe to move over steam games from my failing HDD to a new SSD and it's been working perfectly, except for a few games where some of the files are totally missing/corrupt because the disk is almost dead.

In these cases, the call to sourceStream.BeginRead(...) in the TransferFiles of the TransferManager class will throw an uncaught System.IO.IOException with the message Data error (cyclic redundancy check), which crashes the program.

I think a good solution would be for GamePipe to skip copying a file if it encounters an IOException, and then inform the user that they should verify the game through Steam.

In my local build of GamePipe I have solved this by wrapping the call to sourceStream.BeginRead(...) in a try/catch, however there is probably a more elegant solution.