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 = [