mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 18:18:56 +00:00
feature(rest) onPut: forEach -> RegExp
This commit is contained in:
parent
ed29320b90
commit
897f0099b2
1 changed files with 3 additions and 5 deletions
|
|
@ -262,14 +262,12 @@
|
|||
if (!files.from) {
|
||||
callback(body);
|
||||
} else {
|
||||
from = mellow.pathToWin(files.from);
|
||||
from = mellow.pathToWin(files.from);
|
||||
|
||||
if (files.to)
|
||||
to = mellow.pathToWin(files.to);
|
||||
to = mellow.pathToWin(files.to);
|
||||
else
|
||||
['.zip', '.tar.gz', '.gz'].forEach(function(str) {
|
||||
to = files.from.replace(str);
|
||||
});
|
||||
to = files.from.replace(/(\.gz|\.tar\.gz)$/, '');
|
||||
|
||||
packer.unpack(from, to, function(error) {
|
||||
var name = path.basename(files.from),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue