diff --git a/pycdlib/pycdlib.py b/pycdlib/pycdlib.py index 6c2bb1e9..b397c63d 100644 --- a/pycdlib/pycdlib.py +++ b/pycdlib/pycdlib.py @@ -3102,7 +3102,9 @@ def _add_hard_link_to_inode(self, data_ino, length, file_mode, vd = self.pvd rr = self.rock_ridge xa = self.xa - elif joliet_new_path is not None: + else: + # Above we checked to make sure we got exactly one new path, so + # we know for certain that this is Joliet. if self.joliet_vd is None: raise pycdlibexception.PyCdlibInternalError('Tried to link to Joliet record on non-Joliet ISO') # ... to a file on the Joliet filesystem. @@ -3110,8 +3112,6 @@ def _add_hard_link_to_inode(self, data_ino, length, file_mode, vd = self.joliet_vd rr = '' xa = False - # Above we checked to make sure we got at least one new path, so we - # don't need to worry about the else situation here. new_rec = dr.DirectoryRecord() new_rec.new_file(vd, length, new_name, new_parent,