abiword shouldnt be used for HTML native documents

This commit is contained in:
John McLear 2014-05-06 17:32:45 +01:00
parent e85d09400e
commit 6d38b05623
1 changed files with 4 additions and 1 deletions

View File

@ -114,7 +114,10 @@ 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) {
console.warn("Using abiword");
abiword.convertFile(srcFile, destFile, "htm", function(err) {
//catch convert errors
if(err) {