mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-06-16 19:24:53 -04:00
Spelling fixes in log messages, made a delay windows-only which according to a comment should be windows-only, fixed a random filename generator.
This commit is contained in:
parent
bf0fe9377d
commit
4fc4a35381
3 changed files with 27 additions and 25 deletions
|
@ -81,10 +81,9 @@ exports.doExport = function(req, res, padId, type)
|
|||
res.send(html);
|
||||
callback("stop");
|
||||
}
|
||||
//write the html export to a file
|
||||
else
|
||||
else //write the html export to a file
|
||||
{
|
||||
randNum = Math.floor(Math.random()*new Date().getTime());
|
||||
randNum = Math.floor(Math.random()*0xFFFFFFFF);
|
||||
srcFile = tempDirectory + "/eplite_export_" + randNum + ".html";
|
||||
fs.writeFile(srcFile, html, callback);
|
||||
}
|
||||
|
@ -114,10 +113,13 @@ exports.doExport = function(req, res, padId, type)
|
|||
function(callback)
|
||||
{
|
||||
//100ms delay to accomidate for slow windows fs
|
||||
setTimeout(function()
|
||||
{
|
||||
fs.unlink(destFile, callback);
|
||||
}, 100);
|
||||
if(os.type().indexOf("Windows") > -1)
|
||||
{
|
||||
setTimeout(function()
|
||||
{
|
||||
fs.unlink(destFile, callback);
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
], callback);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue