CC-2633: airtime-import of relative path crashes

- fixed
- using copyfile() instead of copy()
This commit is contained in:
James 2011-08-03 15:28:40 -04:00
parent ee943958d6
commit b5f232ccaf
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ def copy_or_move_files_to(paths, dest, flag):
destfile = dest+os.path.basename(path) destfile = dest+os.path.basename(path)
if(flag == 'copy'): if(flag == 'copy'):
print "Copying %(src)s to %(dest)s..." % {'src':path, 'dest':destfile} print "Copying %(src)s to %(dest)s..." % {'src':path, 'dest':destfile}
shutil.copy(path, destfile) shutil.copyfile(path, destfile)
elif(flag == 'move'): elif(flag == 'move'):
print "Moving %(src)s to %(dest)s..." % {'src':path, 'dest':destfile} print "Moving %(src)s to %(dest)s..." % {'src':path, 'dest':destfile}
shutil.move(path, destfile) shutil.move(path, destfile)