From 2bee80d7646da03f82b42d971b2b4cb5aa790580 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 4 Jul 2014 04:36:21 -0400 Subject: [PATCH] fix(rest) zip file if !to --- lib/server/rest.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/server/rest.js b/lib/server/rest.js index 4568c470..0d641476 100644 --- a/lib/server/rest.js +++ b/lib/server/rest.js @@ -340,9 +340,10 @@ sendError(params, p.data); } else { from = mellow.convertPath(files.from); - to = mellow.convertPath(files.to); - if (!to) + if (files.to) + to = mellow.convertPath(files.to); + else to = from + '.zip'; pack.gzip(from, to, function(error) {