pull/503/merge
Peter 'Pita' Martischka 2012-02-27 14:20:33 +01:00
parent 973aad5c96
commit 0c77052698
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ exports.doImport = function(req, res, padId)
//this allows us to accept source code files like .c or .java //this allows us to accept source code files like .c or .java
function(callback) function(callback)
{ {
var fileEnding = srcFile.split(".")[1].toLowerCase(); var fileEnding = (srcFile.split(".")[1] || "").toLowerCase();
var knownFileEndings = ["txt", "doc", "docx", "pdf", "odt", "html", "htm"]; var knownFileEndings = ["txt", "doc", "docx", "pdf", "odt", "html", "htm"];
//find out if this is a known file ending //find out if this is a known file ending