saner copyfile method (that works for files > max python str len)
This commit is contained in:
parent
7884e8671a
commit
5c377a5d3a
1 changed files with 3 additions and 1 deletions
|
@ -5,6 +5,7 @@ from __future__ import division
|
||||||
import os
|
import os
|
||||||
import hashlib
|
import hashlib
|
||||||
import re
|
import re
|
||||||
|
import shutil
|
||||||
import struct
|
import struct
|
||||||
import subprocess
|
import subprocess
|
||||||
import sqlite3
|
import sqlite3
|
||||||
|
@ -249,7 +250,8 @@ def makedirs(path):
|
||||||
def copy_file(source, target, verbose=False):
|
def copy_file(source, target, verbose=False):
|
||||||
if verbose:
|
if verbose:
|
||||||
print 'copying', source, 'to', target
|
print 'copying', source, 'to', target
|
||||||
write_file(target, read_file(source))
|
write_path(target)
|
||||||
|
shutil.copyfile(source, target)
|
||||||
|
|
||||||
def read_file(file, verbose=False):
|
def read_file(file, verbose=False):
|
||||||
if verbose:
|
if verbose:
|
||||||
|
|
Loading…
Reference in a new issue