mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
ImportHandler: flattened code
Removed redundant else, no functional changes
This commit is contained in:
parent
49a7572cee
commit
fcd88de900
1 changed files with 10 additions and 9 deletions
|
@ -105,9 +105,11 @@ exports.doImport = function(req, res, padId)
|
||||||
//if the file ending is known, continue as normal
|
//if the file ending is known, continue as normal
|
||||||
if(fileEndingKnown) {
|
if(fileEndingKnown) {
|
||||||
callback();
|
callback();
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//we need to rename this file with a .txt ending
|
//we need to rename this file with a .txt ending
|
||||||
else {
|
|
||||||
if(settings.allowUnknownFileEnds === true){
|
if(settings.allowUnknownFileEnds === true){
|
||||||
var oldSrcFile = srcFile;
|
var oldSrcFile = srcFile;
|
||||||
srcFile = path.join(path.dirname(srcFile),path.basename(srcFile, fileEnding)+".txt");
|
srcFile = path.join(path.dirname(srcFile),path.basename(srcFile, fileEnding)+".txt");
|
||||||
|
@ -116,7 +118,6 @@ exports.doImport = function(req, res, padId)
|
||||||
console.warn("Not allowing unknown file type to be imported", fileEnding);
|
console.warn("Not allowing unknown file type to be imported", fileEnding);
|
||||||
callback("uploadFailed");
|
callback("uploadFailed");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
function(callback){
|
function(callback){
|
||||||
destFile = path.join(tmpDirectory, "etherpad_import_" + randNum + "." + exportExtension);
|
destFile = path.join(tmpDirectory, "etherpad_import_" + randNum + "." + exportExtension);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue