Closed
Description
I created some functionality to zip a folder recursively based on the example code here, however, the files before zipping where not binary equal to the unzipped files.
When I changed the following line:
else
io.get_output_stream(zipFilePath) { |f| f.puts(File.open(diskFilePath, "rb").read())}
end
to
else
io.get_output_stream(zipFilePath) { |f| f.write(File.open(diskFilePath, "rb").read())}
end
Files are binary equal after zipping/unzipping
EDIT: I still had a mistake.. imho which shows the example code should be tested thoroughly on multiple platforms.
Metadata
Metadata
Assignees
Labels
No labels