There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
Download file missmatched
There is a little bug in procedure Download(...).
When a file exists and the size is greater than the size of the file to download, the result (the downloaded file) is missmatched.
The function OpenWrite() of FileInfo-Object opens the target file on position 0 and write the content of downloadstream beginning at this position.
But is the target file greater than written lenght, the file isn't truncated.
Target file to overwrite size =1000 Byte
Download size = 200 Byte
Result = 1000 Byte
Using the function Open(FileMode.Create, FileAccess.Write) instead Open() will truncate the file first.