diff options
-rw-r--r-- | rdiff-backup/CHANGELOG | 4 | ||||
-rw-r--r-- | rdiff-backup/rdiff_backup/fs_abilities.py | 35 |
2 files changed, 25 insertions, 14 deletions
diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG index 781a592..21302dd 100644 --- a/rdiff-backup/CHANGELOG +++ b/rdiff-backup/CHANGELOG @@ -1,6 +1,10 @@ New in v1.1.11 (????/??/??) --------------------------- +Fix for bug #19895 -- eliminate traceback for special file detection +on CIFS mounts. (Jonathan Hankins) + + New in v1.1.10 (2007/05/12) --------------------------- diff --git a/rdiff-backup/rdiff_backup/fs_abilities.py b/rdiff-backup/rdiff_backup/fs_abilities.py index e6534de..25c1226 100644 --- a/rdiff-backup/rdiff_backup/fs_abilities.py +++ b/rdiff-backup/rdiff_backup/fs_abilities.py @@ -420,17 +420,20 @@ class FSAbilities: def set_escape_dos_devices(self, subdir): """If special file aux can be stat'd, escape special files""" - device_rp = subdir.append("aux") - if device_rp.lstat(): - assert device_rp.lstat() + try: + device_rp = subdir.append("aux") + if device_rp.lstat(): + log.Log("escape_dos_devices required by filesystem at %s" \ + % (subdir.path), 4) + self.escape_dos_devices = 1 + else: + log.Log("escape_dos_devices not required by filesystem at %s" \ + % (subdir.path), 4) + self.escape_dos_devices = 0 + except(OSError): log.Log("escape_dos_devices required by filesystem at %s" \ % (subdir.path), 4) self.escape_dos_devices = 1 - else: - assert not device_rp.lstat() - log.Log("escape_dos_devices not required by filesystem at %s" \ - % (subdir.path), 4) - self.escape_dos_devices = 0 def get_readonly_fsa(desc_string, rp): """Return an fsa with given description_string @@ -515,9 +518,11 @@ class BackupSetGlobals(SetGlobals): def set_must_escape_dos_devices(self, rbdir): """If local edd or src edd, then must escape """ - device_rp = rbdir.append("aux") - if device_rp.lstat(): local_edd = 1 - else: local_edd = 0 + try: + device_rp = rbdir.append("aux") + if device_rp.lstat(): local_edd = 1 + else: local_edd = 0 + except (OSError): local_edd = 1 SetConnections.UpdateGlobal('must_escape_dos_devices', \ self.src_fsa.escape_dos_devices or local_edd) log.Log("Backup: must_escape_dos_devices = %d" % \ @@ -606,9 +611,11 @@ class RestoreSetGlobals(SetGlobals): if getattr(self, "src_fsa", None) is not None: src_edd = self.src_fsa.escape_dos_devices else: src_edd = 0 - device_rp = rbdir.append("aux") - if device_rp.lstat(): local_edd = 1 - else: local_edd = 0 + try: + device_rp = rbdir.append("aux") + if device_rp.lstat(): local_edd = 1 + else: local_edd = 0 + except (OSError): local_edd = 1 SetConnections.UpdateGlobal('must_escape_dos_devices', \ src_edd or local_edd) log.Log("Restore: must_escape_dos_devices = %d" % \ |