mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 18:18:56 +00:00
feature(pack) add str check
This commit is contained in:
parent
f2ff365933
commit
cf8c40c17a
1 changed files with 7 additions and 3 deletions
|
|
@ -25,10 +25,14 @@
|
|||
pipe.create(from, to, options, callback);
|
||||
else
|
||||
createTar(from, function(readStream) {
|
||||
var dir = path.dirname(to),
|
||||
name = path.basename(to, '.zip');
|
||||
var dir, name,
|
||||
isStr = Util.isString(to);
|
||||
|
||||
to = dir + path.sep + name + '.tar.gz';
|
||||
if (isStr) {
|
||||
dir = path.dirname(to),
|
||||
name = path.basename(to, '.zip');
|
||||
to = dir + path.sep + name + '.tar.gz';
|
||||
}
|
||||
|
||||
pipe.create(readStream, to, options, callback);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue