Merge pull request #2149 from ether/dont-use-abiword-for-html

abiword shouldnt be used for HTML native documents
This commit is contained in:
Marcel Klehr 2014-06-11 14:47:33 +02:00
commit cd294c608b
1 changed files with 3 additions and 1 deletions

View File

@ -114,7 +114,9 @@ exports.doImport = function(req, res, padId)
//convert file to html
function(callback) {
if(!importHandledByPlugin){
if (abiword) {
var fileEnding = path.extname(srcFile).toLowerCase();
var fileIsHTML = (fileEnding === ".html" || fileEnding === ".htm");
if (abiword && !fileIsHTML) {
abiword.convertFile(srcFile, destFile, "htm", function(err) {
//catch convert errors
if(err) {