all repos — searchix @ a94632eb788fd014bea0917a683896c44866f431

Search engine for NixOS, nix-darwin, home-manager and NUR users

fix(importer): don't create duplicate nested directories

Alan Pearce
commit

a94632eb788fd014bea0917a683896c44866f431

parent

df3b6bfd571c38aa7099838aa43bb3aff0eff2bf

1 file changed, 3 insertions(+), 10 deletions(-)

jump to
M internal/importer/importer.gointernal/importer/importer.go
@@ -3,7 +3,6 @@
import ( "context" "log/slog" - "path" "searchix/internal/config" "searchix/internal/index" "sync"
@@ -19,10 +18,8 @@ source *config.Source,
dataPath string, logger *slog.Logger, ) *NixpkgsChannelImporter { - fullpath := path.Join(dataPath, source.Channel) - return &NixpkgsChannelImporter{ - DataPath: fullpath, + DataPath: dataPath, Source: source, Logger: logger, }
@@ -33,10 +30,8 @@ source *config.Source,
dataPath string, logger *slog.Logger, ) *ChannelImporter { - fullpath := path.Join(dataPath, source.Channel) - return &ChannelImporter{ - DataPath: fullpath, + DataPath: dataPath, Source: source, Logger: logger, }
@@ -47,10 +42,8 @@ source *config.Source,
dataPath string, logger *slog.Logger, ) *DownloadOptionsImporter { - fullpath := path.Join(dataPath, source.Channel) - return &DownloadOptionsImporter{ - DataPath: fullpath, + DataPath: dataPath, Source: source, Logger: logger, }