mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 23:46:14 -04:00
ImportHandler: early return by condition inversion
No functional changes
This commit is contained in:
parent
df15daac0e
commit
49a7572cee
1 changed files with 14 additions and 12 deletions
|
@ -285,7 +285,12 @@ exports.doImport = function(req, res, padId)
|
||||||
|
|
||||||
//clean up temporary files
|
//clean up temporary files
|
||||||
function(callback) {
|
function(callback) {
|
||||||
if(!directDatabaseAccess){
|
if (directDatabaseAccess) {
|
||||||
|
callback();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//for node < 0.7 compatible
|
//for node < 0.7 compatible
|
||||||
var fileExists = fs.exists || path.exists;
|
var fileExists = fs.exists || path.exists;
|
||||||
async.parallel([
|
async.parallel([
|
||||||
|
@ -296,9 +301,6 @@ exports.doImport = function(req, res, padId)
|
||||||
fileExists (destFile, function(exist) { (exist)? fs.unlink(destFile, callback): callback(); });
|
fileExists (destFile, function(exist) { (exist)? fs.unlink(destFile, callback): callback(); });
|
||||||
}
|
}
|
||||||
], callback);
|
], callback);
|
||||||
}else{
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
], function(err) {
|
], function(err) {
|
||||||
var status = "ok";
|
var status = "ok";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue