@@ -3107,6 +3107,9 @@ def _add_hard_link_to_inode(self, data_ino, length, file_mode,
3107
3107
# we know for certain that this is Joliet.
3108
3108
if self .joliet_vd is None :
3109
3109
raise pycdlibexception .PyCdlibInternalError ('Tried to link to Joliet record on non-Joliet ISO' )
3110
+ if joliet_new_path is None :
3111
+ # This can really never happen, but here to make mypy happy
3112
+ raise pycdlibexception .PyCdlibInternalError ('Invalid joliet_new_path' )
3110
3113
# ... to a file on the Joliet filesystem.
3111
3114
(new_name , new_parent ) = self ._joliet_name_and_parent_from_path (joliet_new_path )
3112
3115
vd = self .joliet_vd
@@ -4504,6 +4507,9 @@ def modify_file_in_place(self, fp, length, iso_path, rr_name=None, # pylint: di
4504
4507
abs_offset = abs_extent_loc * self .logical_block_size + offset
4505
4508
elif isinstance (record , udfmod .UDFFileEntry ):
4506
4509
abs_offset = record .extent_location () * self .logical_block_size
4510
+ else :
4511
+ # This should never happen
4512
+ raise pycdlibexception .PyCdlibInternalError ('Invalid record type' )
4507
4513
4508
4514
record .set_data_length (length )
4509
4515
self ._cdfp .seek (abs_offset )
@@ -5743,6 +5749,8 @@ def set_hidden(self, iso_path=None, rr_path=None, joliet_path=None):
5743
5749
elif joliet_path is not None :
5744
5750
joliet_path_bytes = self ._normalize_joliet_path (joliet_path )
5745
5751
rec = self ._find_joliet_record (joliet_path_bytes )
5752
+ else :
5753
+ raise pycdlibexception .PyCdlibInvalidInput ('Must provide exactly one of iso_path, rr_path, or joliet_path' )
5746
5754
5747
5755
rec .change_existence (True )
5748
5756
@@ -5773,6 +5781,8 @@ def clear_hidden(self, iso_path=None, rr_path=None, joliet_path=None):
5773
5781
elif joliet_path is not None :
5774
5782
joliet_path_bytes = self ._normalize_joliet_path (joliet_path )
5775
5783
rec = self ._find_joliet_record (joliet_path_bytes )
5784
+ else :
5785
+ raise pycdlibexception .PyCdlibInvalidInput ('Must provide exactly one of iso_path, rr_path, or joliet_path' )
5776
5786
5777
5787
rec .change_existence (False )
5778
5788
0 commit comments