local: fix getXattr returning empty map instead of nil by acme · Pull Request #9274 · rclone/rclone
At least on my macOS Sequoia 15.7.4, the system automatically adds a com.apple.provenance xattr to files created by processes. This xattr lacks the "user." prefix so getXattr filters it out, but the metadata map was already allocated, resulting in an empty non-nil map being returned instead of nil. This caused TestMetadata/Symlink/Xattr and TestMetadata/File/Xattr to fail because they assert the return value is nil when no user xattrs are present. The fix checks if the metadata map is empty after filtering and returns nil if so.