File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -300,6 +300,18 @@ def testOnlyIntermediateParentsInferred(self):
300300
301301 self .assertTarFileContent (self .tempfile , expected_content )
302302
303+ def testDirectoryDoesNotShadowSymlink (self ):
304+ with tar_writer .TarFileWriter (self .tempfile , create_parents = True , allow_dups_from_deps = False ) as f :
305+ f .add_file ("target_dir" , tarfile .DIRTYPE )
306+ f .add_file ("symlink" , tarfile .SYMTYPE , link = "target_dir" )
307+ f .add_file ("symlink" , tarfile .DIRTYPE )
308+ f .add_file ('symlink/a' , content = "q" )
309+ content = [
310+ {"name" : "target_dir" , "type" : tarfile .DIRTYPE },
311+ {"name" : "symlink" , "type" : tarfile .SYMTYPE },
312+ {"name" : "symlink/a" , "type" : tarfile .REGTYPE },
313+ ]
314+ self .assertTarFileContent (self .tempfile , content )
303315
304316
305317if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments