mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
fix(rest) unzip: if !to
This commit is contained in:
parent
2bee80d764
commit
668c51d250
1 changed files with 4 additions and 3 deletions
|
|
@ -361,10 +361,11 @@
|
|||
if (!files.from) {
|
||||
sendError(params, p.data);
|
||||
} else {
|
||||
from = mellow.convertPath(files.from);
|
||||
to = mellow.convertPath(files.to);
|
||||
from = mellow.convertPath(files.from);
|
||||
|
||||
if (!to)
|
||||
if (files.to)
|
||||
to = mellow.convertPath(files.to);
|
||||
else
|
||||
to = Util.rmStrOnce(files.from, ['.zip', '.gzip']);
|
||||
|
||||
pack.gunzip(from, to, function(error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue