aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/dir.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/pkg/dir.go')
-rw-r--r--internal/pkg/dir.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/pkg/dir.go b/internal/pkg/dir.go
index 3e7ad6c2..e446c569 100644
--- a/internal/pkg/dir.go
+++ b/internal/pkg/dir.go
@@ -184,6 +184,8 @@ func Flatten(fsys fs.FS, root string, w io.Writer) (n int, err error) {
return err
}
ent.Data = []byte(newpath)
+ } else if !ent.Mode.IsDir() {
+ return InvalidFileModeError(ent.Mode)
}
nr, err = ent.Encode(w)