Created
March 20, 2017 16:14
-
-
Save bartosh/d3a419a61af67c1ee5fc08232b50eb14 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/meta-refkit/lib/image-dsk.py b/meta-refkit/lib/image-dsk.py | |
index 2bddc5f..ee7d7c3 100644 | |
--- a/meta-refkit/lib/image-dsk.py | |
+++ b/meta-refkit/lib/image-dsk.py | |
@@ -73,6 +73,7 @@ def sparse_copy(src_fname, dst_fname, offset_mib=0): | |
dst_file = open(dst_fname, 'r+b') | |
except IOError: | |
dst_file = open(dst_fname, 'wb') | |
+ dst_file.truncate(os.path.getsize(src_fname)) | |
for first, last in filemap.get_mapped_ranges(0, filemap.blocks_cnt): | |
start = first * filemap.block_size |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment