saner copyfile method (that works for files > max python str len)

This commit is contained in:
rolux 2012-12-26 21:26:43 +01:00
parent 7884e8671a
commit 5c377a5d3a

View file

@ -5,6 +5,7 @@ from __future__ import division
import os
import hashlib
import re
import shutil
import struct
import subprocess
import sqlite3
@ -249,7 +250,8 @@ def makedirs(path):
def copy_file(source, target, verbose=False):
if verbose:
print 'copying', source, 'to', target
write_file(target, read_file(source))
write_path(target)
shutil.copyfile(source, target)
def read_file(file, verbose=False):
if verbose: