\r
if position <= 0:\r
if outputfile2 != os.path.abspath(inputfile):\r
- shutil.copy2(os.path.abspath(inputfile), outputfile2)\r
+ shutil.copyfile(os.path.abspath(inputfile), outputfile2)\r
with open(outputfile1, "wb") as fout:\r
fout.write(b'')\r
else:\r
inputfilesize = getFileSize(inputfile)\r
if position >= inputfilesize:\r
if outputfile1 != os.path.abspath(inputfile):\r
- shutil.copy2(os.path.abspath(inputfile), outputfile1)\r
+ shutil.copyfile(os.path.abspath(inputfile), outputfile1)\r
with open(outputfile2, "wb") as fout:\r
fout.write(b'')\r
else:\r
content2 = fin.read(inputfilesize - position)\r
with open(tempfile2, "wb") as fout2:\r
fout2.write(content2)\r
- shutil.copy2(tempfile1, outputfile1)\r
- shutil.copy2(tempfile2, outputfile2)\r
+ shutil.copyfile(tempfile1, outputfile1)\r
+ shutil.copyfile(tempfile2, outputfile2)\r
except Exception as e:\r
logger.error("Split file failed")\r
raise(e)\r