fix(rest) unzip: if !to

This commit is contained in:
coderaiser 2014-07-04 05:01:48 -04:00
parent 2bee80d764
commit 668c51d250

View file

@ -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) {