fix(put) unzip only if query

This commit is contained in:
coderaiser 2014-06-22 10:16:54 +03:00
parent bbf81a756a
commit 1cdf63bc22

View file

@ -22,6 +22,17 @@
baseName = path.basename(name);
switch(query) {
default:
pipe.create(readStream, name, function(error) {
var msg;
if (!error)
msg = CloudFunc.formatMsg('save', baseName);
func(error, msg);
});
break;
case 'dir':
flop.create(name, 'dir', function(error) {
var msg;
@ -38,12 +49,12 @@
fs.writeFile(name, '', callback);
break;
default:
case 'unzip':
pack.gunzip(readStream, name, function(error) {
var msg;
if (!error)
msg = CloudFunc.formatMsg('save', baseName);
msg = CloudFunc.formatMsg('save (unzip)', baseName);
func(error, msg);
});