Fix race condition

This commit is contained in:
Marcel Klehr 2014-05-15 12:47:28 +00:00
parent c63cb812e8
commit 19be8763c9

View file

@ -53,8 +53,7 @@ exports.doExport = function(req, res, padId, type)
function(err, hookFileName){ function(err, hookFileName){
// if fileName is set then set it to the padId, note that fileName is returned as an array. // if fileName is set then set it to the padId, note that fileName is returned as an array.
if(hookFileName) fileName = hookFileName; if(hookFileName) fileName = hookFileName;
}
);
//tell the browser that this is a downloadable file //tell the browser that this is a downloadable file
res.attachment(fileName + "." + type); res.attachment(fileName + "." + type);
@ -227,4 +226,6 @@ exports.doExport = function(req, res, padId, type)
if(err && err != "stop") ERR(err); if(err && err != "stop") ERR(err);
}) })
} }
}
);
}; };