Skip to content

Commit f3455b5

Browse files
committed
storage/file: fix preserving spareness on volume clone
Force creating sparse file, even if source volume is not such file (for example block device). Reported by @na-- QubesOS/qubes-issues#3255
1 parent f18f4c9 commit f3455b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

qubes/storage/file.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ def copy_file(source, destination):
429429
os.makedirs(parent_dir)
430430

431431
try:
432-
cmd = ['cp', '--sparse=auto',
432+
cmd = ['cp', '--sparse=always',
433433
'--reflink=auto', source, destination]
434434
subprocess.check_call(cmd)
435435
except subprocess.CalledProcessError:

0 commit comments

Comments
 (0)