ImportHandler: early return by condition inversion
No functional changespull/3509/head
parent
df15daac0e
commit
49a7572cee
|
@ -285,7 +285,12 @@ exports.doImport = function(req, res, padId)
|
|||
|
||||
//clean up temporary files
|
||||
function(callback) {
|
||||
if(!directDatabaseAccess){
|
||||
if (directDatabaseAccess) {
|
||||
callback();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//for node < 0.7 compatible
|
||||
var fileExists = fs.exists || path.exists;
|
||||
async.parallel([
|
||||
|
@ -296,9 +301,6 @@ exports.doImport = function(req, res, padId)
|
|||
fileExists (destFile, function(exist) { (exist)? fs.unlink(destFile, callback): callback(); });
|
||||
}
|
||||
], callback);
|
||||
}else{
|
||||
callback();
|
||||
}
|
||||
}
|
||||
], function(err) {
|
||||
var status = "ok";
|
||||
|
|
Loading…
Reference in New Issue