mirror of
https://github.com/appium/appium.git
synced 2026-01-21 01:29:52 -06:00
we already have ncp, no need for copyFile
This commit is contained in:
@@ -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);
|
||||
});
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user