diff --git a/package/osx/installer.js b/package/osx/installer.js index b445a497..bbdceebc 100644 --- a/package/osx/installer.js +++ b/package/osx/installer.js @@ -103,7 +103,7 @@ function checkFilePath(path, ext) { if (!path) { throw 'File not specified: ' + ext; } - if (!path.endsWith('.' + ext)) { + if (path.substr(-(ext.length + 1)) !== '.' + ext) { throw 'Bad file extension: ' + ext + ' (' + path + ')'; } var file = Application('System Events').files.byName(path);