mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 22:23:33 +01:00
abiword shouldnt be used for HTML native documents
This commit is contained in:
parent
e85d09400e
commit
6d38b05623
1 changed files with 4 additions and 1 deletions
|
@ -114,7 +114,10 @@ exports.doImport = function(req, res, padId)
|
||||||
//convert file to html
|
//convert file to html
|
||||||
function(callback) {
|
function(callback) {
|
||||||
if(!importHandledByPlugin){
|
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) {
|
abiword.convertFile(srcFile, destFile, "htm", function(err) {
|
||||||
//catch convert errors
|
//catch convert errors
|
||||||
if(err) {
|
if(err) {
|
||||||
|
|
Loading…
Reference in a new issue