diff --git a/src/duplicacy_entry_test.go b/src/duplicacy_entry_test.go index 03267340..8c2420b5 100644 --- a/src/duplicacy_entry_test.go +++ b/src/duplicacy_entry_test.go @@ -240,10 +240,12 @@ func TestEntryExcludeByAttribute(t *testing.T) { if runtime.GOOS == "darwin" { excludeAttrName = "com.apple.metadata:com_apple_backup_excludeItem" excludeAttrValue = []byte("com.apple.backupd") - } else if runtime.GOOS == "linux" || runtime.GOOS == "freebsd" || runtime.GOOS == "netbsd" || runtime.GOOS == "solaris" { + } else if runtime.GOOS == "linux" { excludeAttrName = "user.duplicacy_exclude" + } else if runtime.GOOS == "freebsd" || runtime.GOOS == "netbsd" { + excludeAttrName = "duplicacy_exclude" } else { - t.Skip("skipping test, not darwin, linux, freebsd, netbsd, or solaris") + t.Skip("skipping test, not darwin, linux, freebsd, or netbsd") } testDir := filepath.Join(os.TempDir(), "duplicacy_test") diff --git a/src/duplicacy_utils_posix.go b/src/duplicacy_utils_linux.go similarity index 86% rename from src/duplicacy_utils_posix.go rename to src/duplicacy_utils_linux.go index 20bf9fe8..ce842fd6 100644 --- a/src/duplicacy_utils_posix.go +++ b/src/duplicacy_utils_linux.go @@ -2,13 +2,8 @@ // Free for personal use and commercial trial // Commercial use requires per-user licenses available from https://duplicacy.com -// +build freebsd netbsd linux solaris - package duplicacy -import ( -) - func excludedByAttribute(attributes map[string][]byte) bool { _, ok := attributes["user.duplicacy_exclude"] return ok diff --git a/src/duplicacy_utils_xbsd.go b/src/duplicacy_utils_xbsd.go new file mode 100644 index 00000000..9b85899b --- /dev/null +++ b/src/duplicacy_utils_xbsd.go @@ -0,0 +1,13 @@ +// 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 + +//go:build freebsd netbsd +// +build freebsd netbsd + +package duplicacy + +func excludedByAttribute(attributes map[string][]byte) bool { + _, ok := attributes["duplicacy_exclude"] + return ok +}