From 752669ea7239d167ec408b268ad5f1f7f880c063 Mon Sep 17 00:00:00 2001 From: epicX Date: Sun, 10 Jan 2021 11:33:55 +0530 Subject: [PATCH] add support for extension in textEditor Signed-off-by: techyminati --- SHRPTOOLS.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SHRPTOOLS.cpp b/SHRPTOOLS.cpp index 84916b6a7..954ade98e 100644 --- a/SHRPTOOLS.cpp +++ b/SHRPTOOLS.cpp @@ -31,9 +31,9 @@ bool minUtils::compare(string str1,string str2){ } bool minUtils::isFileEditable(string fileExtension){ - vector extensions = {".txt",".xml",".prop",".sh"}; + vector extensions = {".txt", ".xml", ".prop", ".sh", ".conf", ".json", ".cfg", ".rc", ".d", ".md"}; - if(fileExtension == "") return true; + if(fileExtension == "" || fileExtension == "none") return true; for(auto it = extensions.begin(); it < extensions.end(); it++){ if(compare(fileExtension, *it)) return true;