mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
fix(dom) unpack -> extract
This commit is contained in:
parent
27ca342407
commit
fd2dbbdaa3
2 changed files with 3 additions and 21 deletions
|
|
@ -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');
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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 = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue