mirror of
https://github.com/jkl1337/duplicacy.git
synced 2026-01-10 23:54:36 -06:00
The exclude by attribute function is broken on non-Darwin POSIX: linux and freebsd. This is because those xattrs must be prefixed by a legal namespace. The old xattr library implicitly appended the user namespace to the xattr, but the current official go pkg does not (which is just as well). Also fix the test to remove the discordant old xattr dependency and provide test cases for both darwin and non-darwin POSIX.
15 lines
430 B
Go
15 lines
430 B
Go
// Copyright (c) Acrosync LLC. All rights reserved.
|
|
// Free for personal use and commercial trial
|
|
// Commercial use requires per-user licenses available from https://duplicacy.com
|
|
|
|
package duplicacy
|
|
|
|
import (
|
|
"strings"
|
|
)
|
|
|
|
func excludedByAttribute(attributes map[string][]byte) bool {
|
|
value, ok := attributes["com.apple.metadata:com_apple_backup_excludeItem"]
|
|
return ok && strings.Contains(string(value), "com.apple.backupd")
|
|
}
|