we already have ncp, no need for copyFile

This commit is contained in:
Jonathan Lipps
2013-04-12 10:37:58 -07:00
parent b38cf659c6
commit da346905ed
2 changed files with 2 additions and 16 deletions

View File

@@ -279,17 +279,3 @@ exports.rotateImage = function(imgPath, deg, cb) {
cb(null);
});
};
exports.copyFile = function (src, dst, cb) {
var is
, os;
fs.stat(src, function (err) {
if (err) {
return cb(err);
}
is = fs.createReadStream(src);
os = fs.createWriteStream(dst);
util.pump(is, os, cb);
});
};

View File

@@ -8,7 +8,7 @@ var errors = require('./errors')
, status = require("./uiauto/lib/status")
, exec = require('child_process').exec
, fs = require('fs')
, copyFile = require('./helpers').copyFile
, ncp = require('ncp')
, async = require('async')
, path = require('path')
, UnknownError = errors.UnknownError;
@@ -80,7 +80,7 @@ Selendroid.prototype.buildServer = function(cb) {
return cb(err);
}
logger.info("Copying selendroid server to correct destination");
copyFile(src, dest, _.bind(function(err) {
ncp(src, dest, _.bind(function(err) {
if (err) {
logger.error("Error copying selendroid to destination");
return cb(err);