Skip to content

Commit

Permalink
Avoid truncating image files
Browse files Browse the repository at this point in the history
Thanks to inejge for reporting, and the patch.
  • Loading branch information
mpalmer committed Mar 8, 2015
1 parent 0e2d218 commit 4b3bf6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/lvmsync
Expand Up @@ -145,7 +145,7 @@ def process_dumpdata(instream, destdev, snapback = nil, opts = {})
snapback.puts handshake if snapback

verbose "Writing changed data to #{destdev.inspect}"
File.open(destdev, 'w+') do |dest|
File.open(destdev, 'r+') do |dest|
while header = instream.read(12)
offset, chunksize = header.unpack("QN")
offset = ntohq(offset)
Expand Down

0 comments on commit 4b3bf6e

Please sign in to comment.