155 |
if Globals.change_ownership: |
if Globals.change_ownership: |
156 |
rpout.chown(*rpout.conn.user_group.map_rpath(rpin)) |
rpout.chown(*rpout.conn.user_group.map_rpath(rpin)) |
157 |
if rpin.issym(): return # symlinks don't have times or perms |
if rpin.issym(): return # symlinks don't have times or perms |
158 |
if Globals.resource_forks_write and rpin.isreg(): |
if (Globals.resource_forks_write and rpin.isreg() and |
159 |
|
rpin.has_resource_fork()): |
160 |
rpout.write_resource_fork(rpin.get_resource_fork()) |
rpout.write_resource_fork(rpin.get_resource_fork()) |
161 |
if Globals.carbonfile_write and rpin.isreg(): |
if Globals.carbonfile_write and rpin.isreg(): |
162 |
rpout.write_carbonfile(rpin.get_carbonfile()) |
rpout.write_carbonfile(rpin.get_carbonfile()) |
177 |
check_for_files(rpin, rpout) |
check_for_files(rpin, rpout) |
178 |
if Globals.change_ownership: apply(rpout.chown, rpin.getuidgid()) |
if Globals.change_ownership: apply(rpout.chown, rpin.getuidgid()) |
179 |
if rpin.issym(): return # symlinks don't have times or perms |
if rpin.issym(): return # symlinks don't have times or perms |
180 |
if Globals.resource_forks_write and rpin.isreg() and rpout.isreg(): |
if (Globals.resource_forks_write and rpin.isreg() and |
181 |
|
rpin.has_resource_fork() and rpout.isreg()): |
182 |
rpout.write_resource_fork(rpin.get_resource_fork()) |
rpout.write_resource_fork(rpin.get_resource_fork()) |
183 |
if Globals.carbonfile_write and rpin.isreg() and rpout.isreg(): |
if Globals.carbonfile_write and rpin.isreg() and rpout.isreg(): |
184 |
rpout.write_carbonfile(rpin.get_carbonfile()) |
rpout.write_carbonfile(rpin.get_carbonfile()) |
606 |
|
|
607 |
def get_acl(self): |
def get_acl(self): |
608 |
"""Return access control list object from dictionary""" |
"""Return access control list object from dictionary""" |
609 |
return self.data['acl'] |
try: return self.data['acl'] |
610 |
|
except KeyError: |
611 |
|
acl = self.data['acl'] = get_blank_acl(self.index) |
612 |
|
return acl |
613 |
|
|
614 |
def set_ea(self, ea): |
def set_ea(self, ea): |
615 |
"""Record extended attributes in dictionary. Does not write""" |
"""Record extended attributes in dictionary. Does not write""" |
617 |
|
|
618 |
def get_ea(self): |
def get_ea(self): |
619 |
"""Return extended attributes object""" |
"""Return extended attributes object""" |
620 |
return self.data['ea'] |
try: return self.data['ea'] |
621 |
|
except KeyError: |
622 |
|
ea = self.data['ea'] = get_blank_ea(self.index) |
623 |
|
return ea |
624 |
|
|
625 |
def has_carbonfile(self): |
def has_carbonfile(self): |
626 |
"""True if rpath has a carbonfile parameter""" |
"""True if rpath has a carbonfile parameter""" |
1251 |
if Globals.carbonfile_conn and rpath.isreg(): rpath.get_carbonfile() |
if Globals.carbonfile_conn and rpath.isreg(): rpath.get_carbonfile() |
1252 |
|
|
1253 |
|
|
1254 |
# These two are overwritten by the eas_acls.py module. We can't |
# These functions are overwritten by the eas_acls.py module. We can't |
1255 |
# import that module directly because of circular dependency problems. |
# import that module directly because of circular dependency problems. |
1256 |
def acl_get(rp): assert 0 |
def acl_get(rp): assert 0 |
1257 |
|
def get_blank_acl(index): assert 0 |
1258 |
def ea_get(rp): assert 0 |
def ea_get(rp): assert 0 |
1259 |
|
def get_blank_ea(index): assert 0 |