diff --git a/lib/server/rest.js b/lib/server/rest.js index 9fe49f1d..a74c67ef 100644 --- a/lib/server/rest.js +++ b/lib/server/rest.js @@ -36,14 +36,12 @@ NOT_LOG = true, - fse = main.srvrequire('ncp') || { - copy : function(from, to, callback) { - pipe.create({ - from : from, - to : to, - callback : callback - }); - } + copy = main.srvrequire('ncp') || function(from, to, callback) { + pipe.create({ + from : from, + to : to, + callback : callback + }); }; /** @@ -279,7 +277,7 @@ if (!Util.checkObjTrue(lFiles, ['from', 'to'])) sendError(pParams, p.data); else - fse.copy(lFiles.from, lFiles.to, function(error) { + copy(lFiles.from, lFiles.to, function(error) { if (error) sendError(pParams, error); else