@@ -590,15 +590,6 @@ func (extraction *Extraction) extractFile(ast *ast.File, pkg *packages.Package)
590590 return nil
591591}
592592
593- // stemAndExt splits a given file name into its stem (the part before the last '.')
594- // and extension (the part after the last '.')
595- func stemAndExt (base string ) (string , string ) {
596- if i := strings .LastIndexByte (base , '.' ); i >= 0 {
597- return base [:i ], base [i + 1 :]
598- }
599- return base , ""
600- }
601-
602593// extractFileInfo extracts file-system level information for the given file, populating
603594// the `files` and `containerparent` tables
604595func (extraction * Extraction ) extractFileInfo (tw * trap.Writer , file string ) {
@@ -627,9 +618,8 @@ func (extraction *Extraction) extractFileInfo(tw *trap.Writer, file string) {
627618 path = parentPath + "/" + component
628619 }
629620 if i == len (components )- 1 {
630- stem , ext := stemAndExt (component )
631621 lbl := tw .Labeler .FileLabelFor (file )
632- dbscheme .FilesTable .Emit (tw , lbl , path , stem , ext , 0 )
622+ dbscheme .FilesTable .Emit (tw , lbl , path )
633623 dbscheme .ContainerParentTable .Emit (tw , parentLbl , lbl )
634624 dbscheme .HasLocationTable .Emit (tw , lbl , emitLocation (tw , lbl , 0 , 0 , 0 , 0 ))
635625 extraction .Lock .Lock ()
@@ -639,7 +629,7 @@ func (extraction *Extraction) extractFileInfo(tw *trap.Writer, file string) {
639629 break
640630 }
641631 lbl := tw .Labeler .GlobalID (util .EscapeTrapSpecialChars (path ) + ";folder" )
642- dbscheme .FoldersTable .Emit (tw , lbl , path , component )
632+ dbscheme .FoldersTable .Emit (tw , lbl , path )
643633 if i > 0 {
644634 dbscheme .ContainerParentTable .Emit (tw , parentLbl , lbl )
645635 }
0 commit comments