From 52728affe900424c456a596eaf34c83ae7e500d5 Mon Sep 17 00:00:00 2001 From: Shulhan Date: Mon, 11 Dec 2023 16:48:06 +0700 Subject: all: fix memfs excludes regex Previously, the regex does not contains "^" and "$" which makes file like "multi-user.target.wants" considered as ".tar" file and being excluded. --- http_server.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'http_server.go') diff --git a/http_server.go b/http_server.go index 1926cfb..70dc7a8 100644 --- a/http_server.go +++ b/http_server.go @@ -72,10 +72,10 @@ func newHTTPServer(aww *Awwan, address string) (httpd *httpServer, err error) { var memfsBaseOpts = &memfs.Options{ Root: aww.BaseDir, Excludes: []string{ - `.*/\.git$`, - `node_modules`, - `vendor`, - `.*\.(bz|bz2|gz|iso|jar|tar|xz|zip)`, + `^.*/\.git$`, + `^node_modules$`, + `^vendor$`, + `^.*\.(bz|bz2|gz|iso|jar|tar|xz|zip)$`, }, TryDirect: true, // Only store the file structures in the memory. } -- cgit v1.3