diff options
| author | Shulhan <ms@kilabit.info> | 2023-12-11 16:48:06 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2023-12-14 20:23:47 +0700 |
| commit | 52728affe900424c456a596eaf34c83ae7e500d5 (patch) | |
| tree | 034e47eed7682d2a3657d9b81f291372d5effab0 /http_server.go | |
| parent | 0d1988930744df3f402aa81f7d2b8d927cb205a9 (diff) | |
| download | awwan-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.
Diffstat (limited to 'http_server.go')
| -rw-r--r-- | http_server.go | 8 |
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. } |
