diff options
author | Alan Pearce | 2024-05-14 17:27:11 +0200 |
---|---|---|
committer | Alan Pearce | 2024-05-14 17:27:11 +0200 |
commit | a94632eb788fd014bea0917a683896c44866f431 (patch) | |
tree | dfe8003f10ee24487998eaf7aa8c31f07649eb79 | |
parent | df3b6bfd571c38aa7099838aa43bb3aff0eff2bf (diff) | |
download | searchix-a94632eb788fd014bea0917a683896c44866f431.tar.lz searchix-a94632eb788fd014bea0917a683896c44866f431.tar.zst searchix-a94632eb788fd014bea0917a683896c44866f431.zip |
fix(importer): don't create duplicate nested directories
-rw-r--r-- | internal/importer/importer.go | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/internal/importer/importer.go b/internal/importer/importer.go index c50a72b..0768656 100644 --- a/internal/importer/importer.go +++ b/internal/importer/importer.go @@ -3,7 +3,6 @@ package importer import ( "context" "log/slog" - "path" "searchix/internal/config" "searchix/internal/index" "sync" @@ -19,10 +18,8 @@ func NewNixpkgsChannelImporter( 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 @@ func NewChannelImporter( 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 @@ func NewDownloadOptionsImporter( dataPath string, logger *slog.Logger, ) *DownloadOptionsImporter { - fullpath := path.Join(dataPath, source.Channel) - return &DownloadOptionsImporter{ - DataPath: fullpath, + DataPath: dataPath, Source: source, Logger: logger, } |