https://bugzilla.samba.org/show_bug.cgi?id=8566

--- Comment #6 from Mike Bombich <m...@bombich.com> 2012-03-23 15:25:19 UTC ---
My own build of rsync preserves Spotlight comments just fine. Those comments
are stored as extended attributes, so as long as you preserve xattrs, your
Spotlight comments should be preserved. Before you make the conclusion that
your Spotlight comments have *not* been preserved, verify whether the
"com.apple.metadata:kMDItemFinderComment" exists on the destination file. Also,
you should verify that Spotlight is enabled on the destination.

mdutil -s /Volumes/Target

[bombich:/Volumes/Source] touch test
[bombich:/Volumes/Source] xattr --list test

<add a Spotlight comment in Finder>

[bombich:/Volumes/Source] xattr --list test
com.apple.metadata:kMDItemFinderComment

[bombich:/Volumes/Source] xattr --get com.apple.metadata:kMDItemFinderComment
test
com.apple.metadata:kMDItemFinderComment    bplist00^This is a tes   

[bombich:/Volumes/Source] ls -la /Volumes/Target/test
ls: /Volumes/Target/test: No such file or directory

<rsync Source to Target, preserving xattrs -- I used 3.0.6 + some various bug
fixes from 3.0.7-3.0.9>

[bombich:/Volumes/Source] ls -la /Volumes/Target/test
-rw-r--r--@ 1 bombich  wheel  0 Mar 23 11:18 /Volumes/Target/test

[bombich:/Volumes/Source] xattr --list /Volumes/Target/test 
com.apple.metadata:kMDItemFinderComment

[bombich:/Volumes/Source] xattr --get com.apple.metadata:kMDItemFinderComment
/Volumes/Target/test 
com.apple.metadata:kMDItemFinderComment    bplist00^This is a tes   

[Note: I use a custom build of the "xattr" tool so the arguments may be
different on your system]

Lastly, you should note that Finder has some display problems with Spotlight
comments. I don't know if the problem resides within Finder or Spotlight, but
I've seen odd delays associated with the proper information appearing the the
Spotlight comments field. For example, the Spotlight comments appear in the
xattr on the destination file, but they do not appear immediately in the
Finder. Additionally, if you delete the source file, then re-touch it and Get
Info, the old Spotlight comments are still there, even though the xattr is
empty. So don't use the Finder as a measure of whether these comments are
preserved, use the xattr contents instead.

-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to