From 72bef0883b71aa46b6470a678fd67f099acaec97 Mon Sep 17 00:00:00 2001 From: ajm-asiaa Date: Fri, 28 Aug 2020 15:19:57 +0800 Subject: [PATCH] improves valid file detection --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 6e5354b..189966b 100644 --- a/main.js +++ b/main.js @@ -143,7 +143,7 @@ let mainWindow; if (fs.statSync(arg1).isFile() === true) { // console.log('DEBUG: File detected'); //double check that it is a valid filetype for CARTA - if ( arg1.includes('.fits') || arg1.includes('.hdf5') ) { + if ( arg1.endsWith('.fits') || arg1.endsWith('.hdf5') ) { var filemode = 1 // console.log('DEBUG: File type should be OK', arg1); if (items.remote === true) {