From 9c27d3790b594c94430015675c91ce618c61be1d Mon Sep 17 00:00:00 2001 From: Agando Date: Fri, 23 Oct 2026 18:25:52 +0200 Subject: fix(newos4): an invalid grep pattern returns a message, not an exception (v4.6.64) Packet 8. `new RegExp(pattern)` sat unguarded in the terminal grep handler and in VFS find()/grep(), so a bad pattern threw out of the command handler into the error ledger -- the same ledger packet 2 had to stop trusting. - module-fs.js grep: compile in try/catch, print "grep: invalid pattern: ()" as a warning and return - virtual-fs.js find()/grep(): same guard, return [] and stash the message on _lastPatternError instead of throwing into the module error wrapper Verified live on v4.6.64 with the packet's own repro: `grep "/\bug_id\" file` prints the message, the error counter stays 0 (was: one ledger entry per call), a valid pattern still matches, and fs.grep('[') returns [] instead of throwing. --- modules/core/module-loader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/core/module-loader.js') diff --git a/modules/core/module-loader.js b/modules/core/module-loader.js index 5bf2a4c..abc1a86 100644 --- a/modules/core/module-loader.js +++ b/modules/core/module-loader.js @@ -4,7 +4,7 @@ // Core module bundle loaded synchronously in main.html. // This loader only handles version cache-busting, splash, terminal init, and optional ext modules. - const LATEST_VER = 'v4.6.63'; + const LATEST_VER = 'v4.6.64'; const CACHE = '?v=' + LATEST_VER; const stored = localStorage.getItem('webx11_cache_ver'); if (stored !== LATEST_VER) { -- cgit v1.2.3