summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rdiff-backup/CHANGELOG4
-rw-r--r--rdiff-backup/rdiff_backup/fs_abilities.py10
-rw-r--r--rdiff-backup/rdiff_backup/rpath.py4
3 files changed, 11 insertions, 7 deletions
diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG
index 091e330..9ca6020 100644
--- a/rdiff-backup/CHANGELOG
+++ b/rdiff-backup/CHANGELOG
@@ -26,6 +26,10 @@ files. fix from Konrad Podloucky.
bug#12949: eliminate an exception during fs abilities testing on OS X 10.4.
fix from Daniel Westermann-Clark.
+patch#4136: OSX filename/rsrc has been deprecated for some time, and as of OSX
+10.4 it causes log spam. the new proper use is filename/..namedfork/rsrc. fix
+from Daniel Westermann-Clark.
+
New in v0.13.6 (2005/04/07)
---------------------------
diff --git a/rdiff-backup/rdiff_backup/fs_abilities.py b/rdiff-backup/rdiff_backup/fs_abilities.py
index f1fcecc..ff9fd19 100644
--- a/rdiff-backup/rdiff_backup/fs_abilities.py
+++ b/rdiff-backup/rdiff_backup/fs_abilities.py
@@ -39,7 +39,7 @@ class FSAbilities:
hardlinks = None # True if hard linking supported
fsync_dirs = None # True if directories can be fsync'd
dir_inc_perms = None # True if regular files can have full permissions
- resource_forks = None # True if regular_file/rsrc holds resource fork
+ resource_forks = None # True if regular_file/..namedfork/rsrc holds resource fork
carbonfile = None # True if Mac Carbon file data is supported.
name = None # Short string, not used for any technical purpose
read_only = None # True if capabilities were determined non-destructively
@@ -341,18 +341,18 @@ rdiff-backup-data/chars_to_quote.
self.carbonfile = 1
def set_resource_fork_readwrite(self, dir_rp):
- """Test for resource forks by writing to regular_file/rsrc"""
+ """Test for resource forks by writing to regular_file/..namedfork/rsrc"""
assert dir_rp.conn is Globals.local_connection
reg_rp = dir_rp.append('regfile')
reg_rp.touch()
s = 'test string---this should end up in resource fork'
try:
- fp_write = open(os.path.join(reg_rp.path, 'rsrc'), 'wb')
+ fp_write = open(os.path.join(reg_rp.path, '..namedfork', 'rsrc'), 'wb')
fp_write.write(s)
assert not fp_write.close()
- fp_read = open(os.path.join(reg_rp.path, 'rsrc'), 'rb')
+ fp_read = open(os.path.join(reg_rp.path, '..namedfork', 'rsrc'), 'rb')
s_back = fp_read.read()
assert not fp_read.close()
except (OSError, IOError), e: self.resource_forks = 0
@@ -370,7 +370,7 @@ rdiff-backup-data/chars_to_quote.
for rp in selection.Select(dir_rp).set_iter():
if rp.isreg():
try:
- rfork = rp.append('rsrc')
+ rfork = rp.append(os.path.join('..namedfork', 'rsrc'))
fp = rfork.open('rb')
fp.read()
assert not fp.close()
diff --git a/rdiff-backup/rdiff_backup/rpath.py b/rdiff-backup/rdiff_backup/rpath.py
index b03543c..3a292d7 100644
--- a/rdiff-backup/rdiff_backup/rpath.py
+++ b/rdiff-backup/rdiff_backup/rpath.py
@@ -1141,7 +1141,7 @@ class RPath(RORPath):
try: rfork = self.data['resourcefork']
except KeyError:
try:
- rfork_fp = self.conn.open(os.path.join(self.path, 'rsrc'),
+ rfork_fp = self.conn.open(os.path.join(self.path, '..namedfork', 'rsrc'),
'rb')
rfork = rfork_fp.read()
assert not rfork_fp.close()
@@ -1152,7 +1152,7 @@ class RPath(RORPath):
def write_resource_fork(self, rfork_data):
"""Write new resource fork to self"""
log.Log("Writing resource fork to %s" % (self.index,), 7)
- fp = self.conn.open(os.path.join(self.path, 'rsrc'), 'wb')
+ fp = self.conn.open(os.path.join(self.path, '..namedfork', 'rsrc'), 'wb')
fp.write(rfork_data)
assert not fp.close()
self.set_resource_fork(rfork_data)