diff options
Diffstat (limited to 'internal/fusefrontend_reverse/root_node.go')
-rw-r--r-- | internal/fusefrontend_reverse/root_node.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/internal/fusefrontend_reverse/root_node.go b/internal/fusefrontend_reverse/root_node.go index 4297ecf..4346306 100644 --- a/internal/fusefrontend_reverse/root_node.go +++ b/internal/fusefrontend_reverse/root_node.go @@ -27,8 +27,8 @@ type RootNode struct { nameTransform nametransform.NameTransformer // Content encryption helper contentEnc *contentenc.ContentEnc - // Tests whether a path is excluded (hiden) from the user. Used by -exclude. - excluder ignore.IgnoreParser + // Tests whether a path is excluded (hidden) from the user. Used by -exclude. + excluder *ignore.GitIgnore // inoMap translates inode numbers from different devices to unique inode // numbers. inoMap *inomap.InoMap @@ -78,3 +78,9 @@ func (rn *RootNode) findLongnameParent(fd int, diriv []byte, longname string) (p } return } + +// isExcludedPlain finds out if the plaintext path "pPath" is +// excluded (used when -exclude is passed by the user). +func (rn *RootNode) isExcludedPlain(pPath string) bool { + return rn.excluder != nil && rn.excluder.MatchesPath(pPath) +} |