diff options
Diffstat (limited to 'scripts/lib/wic')
-rw-r--r-- | scripts/lib/wic/filemap.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/lib/wic/filemap.py b/scripts/lib/wic/filemap.py index 8719f443c5..764dbbe588 100644 --- a/scripts/lib/wic/filemap.py +++ b/scripts/lib/wic/filemap.py | |||
@@ -563,6 +563,13 @@ def sparse_copy(src_fname, dst_fname, skip=0, seek=0, | |||
563 | start = skip | 563 | start = skip |
564 | 564 | ||
565 | fmap._f_image.seek(start, os.SEEK_SET) | 565 | fmap._f_image.seek(start, os.SEEK_SET) |
566 | |||
567 | written += start - skip - written | ||
568 | if length and written >= length: | ||
569 | dst_file.seek(seek + length, os.SEEK_SET) | ||
570 | dst_file.close() | ||
571 | return | ||
572 | |||
566 | dst_file.seek(seek + start - skip, os.SEEK_SET) | 573 | dst_file.seek(seek + start - skip, os.SEEK_SET) |
567 | 574 | ||
568 | chunk_size = 1024 * 1024 | 575 | chunk_size = 1024 * 1024 |