Commit 628622cb authored by owsla's avatar owsla

On Mac OS X, read the com.apple.FinderInfo extended attribute since it is the

only storage location for the 'busy' (Z) Finder attribute.


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@938 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 5f14332c
New in v1.2.2 (????/??/??) New in v1.2.2 (????/??/??)
--------------------------- ---------------------------
On Mac OS X, read the com.apple.FinderInfo extended attribute since it is the
only storage location for the 'busy' (Z) Finder attribute. (Andrew Ferguson)
Properly fix "AttributeError: RPath instance has no attribute 'inc_compressed'" Properly fix "AttributeError: RPath instance has no attribute 'inc_compressed'"
bug. Fix in 1.1.12 was in correct place, but wrong solution. (Andrew Ferguson) bug. Fix in 1.1.12 was in correct place, but wrong solution. (Andrew Ferguson)
......
...@@ -68,9 +68,8 @@ class ExtendedAttributes: ...@@ -68,9 +68,8 @@ class ExtendedAttributes:
if attr.startswith('system.'): if attr.startswith('system.'):
# Do not preserve system extended attributes # Do not preserve system extended attributes
continue continue
if not rp.isdir() and attr == 'com.apple.FinderInfo' or attr == 'com.apple.ResourceFork': if not rp.isdir() and attr == 'com.apple.ResourceFork':
# FinderInfo and Resource Fork handled elsewhere, except # Resource Fork handled elsewhere, except for directories
# for directories
continue continue
try: self.attr_dict[attr] = rp.conn.xattr.getxattr(rp.path, attr) try: self.attr_dict[attr] = rp.conn.xattr.getxattr(rp.path, attr)
except IOError, exc: except IOError, exc:
......
...@@ -1455,6 +1455,10 @@ def setdata_local(rpath): ...@@ -1455,6 +1455,10 @@ def setdata_local(rpath):
def carbonfile_get(rpath): def carbonfile_get(rpath):
"""Return carbonfile value for local rpath""" """Return carbonfile value for local rpath"""
# Note, after we drop support for Mac OS X 10.0 - 10.3, it will no longer
# be necessary to read the finderinfo struct since it is a strict subset
# of the data stored in the com.apple.FinderInfo extended attribute
# introduced in 10.4. Indeed, FSpGetFInfo() is deprecated on 10.4.
from Carbon.File import FSSpec from Carbon.File import FSSpec
from Carbon.File import FSRef from Carbon.File import FSRef
import Carbon.Files import Carbon.Files
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment