I’m writing a simple program which downloads a resource from the
internet. When I save a file to disk, it always ends up a few bytes
larger than it should be and is thus recognized as a damaged file.
The code I’m using:
client = HTTPClient.new(nil)
my_file = File.new(“x:\temp\logo2.gif”, “w”)
puts actually prints the correct size 8558, but when I check the size on
disk it is 8617 bytes.
I’ve also downloaded the file with firefox to check if the increased
file size is due to the filesystem i’m using. When downloaded which
firefox the file is 8558 bytes on disk, so something must be wrong in my