mirror of
https://github.com/rclone/rclone.git
synced 2026-10-05 20:44:26 -04:00
local: fix getXattr returning empty map instead of nil
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.
This commit is contained in:
500 Internal Server Error
Gitea Version: 1.28.0+dev-477-g8b6ad49a5f