From fd2dbbdaa3c81531ecbc70f21922d0760272cab8 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 9 Jul 2015 10:36:41 -0400 Subject: [PATCH] fix(dom) unpack -> extract --- lib/client/dom.js | 4 ++-- lib/server/rest.js | 20 +------------------- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/lib/client/dom.js b/lib/client/dom.js index cc9d3696..1f845a62 100644 --- a/lib/client/dom.js +++ b/lib/client/dom.js @@ -506,7 +506,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog; fileFrom = { from : dirPath, - to : dirPath, + to : dirPath + name, names : names }; break; @@ -536,7 +536,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog; * unzip file * */ - this.unpack = function() { + this.extract = function() { twopack('extract'); }; diff --git a/lib/server/rest.js b/lib/server/rest.js index 6f865935..6401c97f 100644 --- a/lib/server/rest.js +++ b/lib/server/rest.js @@ -273,26 +273,8 @@ } function pack(from, to, names, fn) { - var name; - from = root(from); - - if (to) - to = root(to); - else - to = from; - - if (names.length > 1) { - name = path.basename(to); - } else { - name = names[0]; - } - - to = path.join(to, name); - - if (!/\.tar\.gz$/.test(to)) { - to += '.tar.gz'; - } + to = root(to); if (!names) { names = [