Fix and reorganize for build for FreeBSD

- the xattr handling of namespaces is different on BSD with the
xattr package, the user namespace is implicit
- Don't backup/exclude files with flag nodump on BSD/Darwin
This commit is contained in:
2023-10-04 23:01:19 -05:00
parent f931d3e9f1
commit c782def49b
8 changed files with 232 additions and 144 deletions

View File

@@ -117,8 +117,12 @@ func (entry *Entry) SetAttributesToFile(fullPath string) {
}
func (entry *Entry) ReadDeviceNode(fileInfo os.FileInfo) bool {
return nil
func (entry *Entry) ReadSpecial(fileInfo os.FileInfo) bool {
return true
}
func (entry *Entry) IsSameSpecial(fileInfo os.FileInfo) bool {
return false
}
func (entry *Entry) RestoreSpecial(fullPath string) error {
@@ -148,8 +152,8 @@ func SplitDir(fullPath string) (dir string, file string) {
return fullPath[:i+1], fullPath[i+1:]
}
func (entry *Entry) ReadFileFlags(f *os.File) error {
return nil
func excludedByAttribute(attributes map[string][]byte) bool {
return false
}
func (entry *Entry) RestoreEarlyDirFlags(path string) error {
@@ -159,7 +163,3 @@ func (entry *Entry) RestoreEarlyDirFlags(path string) error {
func (entry *Entry) RestoreEarlyFileFlags(f *os.File) error {
return nil
}
func (entry *Entry) RestoreLateFileFlags(f *os.File) error {
return nil
}