"getFileType(file)" not working for file names with multiple dots
Trying to compile a file with more than one dot (.) in the file name, does not work unfortunately. The issue obviously lies within the getFileType(file)-method. You take the string after the first occurrence of . as the file type which is correct as long as there aren't multiple dots inside the file name. Compiling then doesn't work as .tex isn't found within this part of the file name (which is not the file type).
I changed the code of the method to the following which works fine:
//Function to get only file type
function getFileType(file) {
var stringFile = getFileNameAndType(file);
var stringFileType = stringFile.split(".");
return stringFileType[(stringFileType.length - 1)];
}
It would be really nice to fix this with the given code or an implementation of yourself, because I encounter this issue fairly often. Although you can rename the file, it's just not as convenient as support for files with multiple dots in the file name.