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
This commit is contained in:
parent
f18f4c9bff
commit
f3455b5d99
@ -429,7 +429,7 @@ def copy_file(source, destination):
|
||||
os.makedirs(parent_dir)
|
||||
|
||||
try:
|
||||
cmd = ['cp', '--sparse=auto',
|
||||
cmd = ['cp', '--sparse=always',
|
||||
'--reflink=auto', source, destination]
|
||||
subprocess.check_call(cmd)
|
||||
except subprocess.CalledProcessError:
|
||||
|
Loading…
Reference in New Issue
Block a user