server(filesystem): fix archive creation with ignore

Signed-off-by: Matthew Penner <me@matthewp.io>
This commit is contained in:
Matthew Penner
2024-03-13 20:29:09 -06:00
parent 8f129931d5
commit 979df34392
4 changed files with 141 additions and 1 deletions

View File

@@ -157,7 +157,7 @@ func (a *Archive) Stream(ctx context.Context, w io.Writer) error {
i := ignore.CompileIgnoreLines(strings.Split(a.Ignore, "\n")...)
callback = a.callback(func(_ int, _, relative string, _ ufs.DirEntry) error {
if i.MatchesPath(relative) {
return ufs.SkipDir
return SkipThis
}
return nil
})