clalancette / oz

Automated installation for guest images
GNU Lesser General Public License v2.1
311 stars 130 forks source link

ozutil.copyfile_sparse doesn't create sparse file using python 3 #277

Open simaishi opened 4 years ago

simaishi commented 4 years ago

Created a 100K file using dd if=/dev/zero of=zeros bs=100K count=1. The file created is:

100K -rw-r--r-- 1 root root 100K Feb 5 12:10 zeros

After copying the file using copyfile_sparse:

python2 (v2.7.5): 0 -rwxr-xr-x 1 root root 100K Feb 5 12:11 new

python3 (v3.6.8): 100K -rwxr-xr-x. 1 root root 100K Feb 5 13:49 new