From 5dd0d515143747c7066e393e602881af086908ec Mon Sep 17 00:00:00 2001 From: antelle Date: Sun, 10 Jan 2021 09:59:51 +0100 Subject: [PATCH] removed endswith --- package/osx/installer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);