From 78c7fb4e22c314f60b82a7c06f901b3ff538907b Mon Sep 17 00:00:00 2001
From: Rob Swindell <rob@synchro.net>
Date: Sat, 29 May 2021 18:27:26 -0700
Subject: [PATCH] Since viewable file types support wildcards now, just use '*'

This installs as the last viewable file type, so it just becomes a
fall-through for all file extensions/types and attempts to view them
using the Archive class.
---
 exec/archive.js | 25 ++++---------------------
 1 file changed, 4 insertions(+), 21 deletions(-)

diff --git a/exec/archive.js b/exec/archive.js
index ac2dfd5ac7..6da27bb7ab 100755
--- a/exec/archive.js
+++ b/exec/archive.js
@@ -108,33 +108,16 @@ function list(filename, verbose)
 
 function install()
 {
-	var viewable_exts = [
-		'7z',
-		'exe',
-		'bz',
-		'gz',
-		'iso',
-		'lha',
-		'lzh',
-		'tbz',
-		'tgz',
-		'rar',
-		'xar',
-		'zip'
-	];
-
 	var cnflib = load({}, "cnflib.js");
 	var file_cnf = cnflib.read("file.cnf");
 	if(!file_cnf) {
 		alert("Failed to read file.cnf");
 		exit(-1);
 	}
-	for(var e in viewable_exts) {
-		file_cnf.fview.push({
-			extension: viewable_exts[e],
-			cmd: '?archive list %f'
-			});
-	}
+	file_cnf.fview.push({
+		extension: "*",
+		cmd: '?archive list %f'
+		});
 	if(!cnflib.write("file.cnf", undefined, file_cnf)) {
 		alert("Failed to write file.cnf");
 		exit(-1);
-- 
GitLab