aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2023-12-11 16:48:06 +0700
committerShulhan <ms@kilabit.info>2023-12-14 20:23:47 +0700
commit52728affe900424c456a596eaf34c83ae7e500d5 (patch)
tree034e47eed7682d2a3657d9b81f291372d5effab0
parent0d1988930744df3f402aa81f7d2b8d927cb205a9 (diff)
downloadawwan-52728affe900424c456a596eaf34c83ae7e500d5.tar.xz
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.
-rw-r--r--http_server.go8
1 files changed, 4 insertions, 4 deletions
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.
}