summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2003-07-19 20:03:28 +0000
committerbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2003-07-19 20:03:28 +0000
commitc5d85b7ce70b0bcc93729d6811f7297ad1294023 (patch)
tree658a6f5f8e6bb026b2a21a61d711a9dd77ec81d8
parentd98745e56f9d52c4c689e04c8303bd9b24ded8b4 (diff)
downloadrdiff-backup-c5d85b7ce70b0bcc93729d6811f7297ad1294023.tar.gz
More fixes from Daniel Hazelbaker, mostly related to resource forks
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@350 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rwxr-xr-xrdiff-backup/dist/makedist2
-rw-r--r--rdiff-backup/rdiff_backup/Main.py2
-rw-r--r--rdiff-backup/rdiff_backup/fs_abilities.py11
-rw-r--r--rdiff-backup/rdiff_backup/rpath.py1
4 files changed, 9 insertions, 7 deletions
diff --git a/rdiff-backup/dist/makedist b/rdiff-backup/dist/makedist
index d41ab90..511afc6 100755
--- a/rdiff-backup/dist/makedist
+++ b/rdiff-backup/dist/makedist
@@ -89,7 +89,7 @@ def MakeTar():
assert not os.system("cp %s %s" % (filename, tardir)), filename
os.mkdir(tardir+"/rdiff_backup")
- for filename in ["backup.py", "connection.py",
+ for filename in ["eas_acls.py", "backup.py", "connection.py",
"FilenameMapping.py", "Hardlink.py",
"increment.py", "__init__.py", "iterfile.py",
"lazy.py", "librsync.py", "log.py", "Main.py",
diff --git a/rdiff-backup/rdiff_backup/Main.py b/rdiff-backup/rdiff_backup/Main.py
index 0aaef7d..5fefef0 100644
--- a/rdiff-backup/rdiff_backup/Main.py
+++ b/rdiff-backup/rdiff_backup/Main.py
@@ -430,6 +430,8 @@ def restore_set_fs_globals(target):
update_bool_global('write_acls', target_fsa.acls)
update_bool_global('read_eas', target_fsa.eas)
update_bool_global('write_eas', target_fsa.eas)
+ update_bool_global('read_resource_forks', target_fsa.resource_forks)
+ update_bool_global('write_resource_forks', target_fsa.resource_forks)
SetConnections.UpdateGlobal('preserve_hardlinks', target_fsa.hardlinks)
SetConnections.UpdateGlobal('change_ownership', target_fsa.ownership)
diff --git a/rdiff-backup/rdiff_backup/fs_abilities.py b/rdiff-backup/rdiff_backup/fs_abilities.py
index 5149c4d..36603ef 100644
--- a/rdiff-backup/rdiff_backup/fs_abilities.py
+++ b/rdiff-backup/rdiff_backup/fs_abilities.py
@@ -27,7 +27,7 @@ FSAbilities object describing it.
"""
-import errno
+import errno, os
import Globals, log, TempFile, selection
class FSAbilities:
@@ -284,18 +284,17 @@ rdiff-backup-data/chars_to_quote.
"""Test for resource forks by writing to regular_file/rsrc"""
reg_rp = dir_rp.append('regfile')
reg_rp.touch()
- rfork = reg_rp.append('rsrc')
- assert not rfork.lstat()
s = 'test string---this should end up in resource fork'
try:
- fp_write = rfork.open('wb')
+ fp_write = reg_rp.conn.open(os.path.join(reg_rp.path, 'rsrc'),
+ 'wb')
fp_write.write(s)
assert not fp_write.close()
- fp_read = rfork.open('rb')
+ fp_read = reg_rp.conn.open(os.path.join(reg_rp.path, 'rsrc'), 'rb')
s_back = fp_read.read()
- assert not fp.read.close()
+ assert not fp_read.close()
except (OSError, IOError), e: self.resource_forks = 0
else: self.resource_forks = (s_back == s)
reg_rp.delete()
diff --git a/rdiff-backup/rdiff_backup/rpath.py b/rdiff-backup/rdiff_backup/rpath.py
index eece138..61c4f8a 100644
--- a/rdiff-backup/rdiff_backup/rpath.py
+++ b/rdiff-backup/rdiff_backup/rpath.py
@@ -1036,6 +1036,7 @@ class RPath(RORPath):
fp = self.conn.open(os.path.join(self.path, 'rsrc'), 'wb')
fp.write(rfork_data)
assert not fp.close()
+ self.set_resource_fork(rfork_data)
class RPathFileHook: