Renamed data_dir to repos_dir
Some checks failed
ci/woodpecker/push/arch unknown status
ci/woodpecker/push/deploy unknown status
ci/woodpecker/push/docker unknown status
ci/woodpecker/push/lint Pipeline failed
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
Jef Roosens 2022-04-07 15:21:27 +02:00
parent a5ac0b6956
commit 3b555efa91
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB
7 changed files with 14 additions and 14 deletions

View file

@ -10,7 +10,7 @@ pub:
pkg_dir string
download_dir string
api_key string
data_dir string
repos_dir string
repos_file string
default_arch string
}

View file

@ -23,7 +23,7 @@ fn (mut app App) get_repo_file(repo string, arch string, filename string) web.Re
db_exts := ['.db', '.files', '.db.tar.gz', '.files.tar.gz']
if db_exts.any(filename.ends_with(it)) {
full_path = os.join_path(app.repo.data_dir, repo, arch, filename)
full_path = os.join_path(app.repo.repos_dir, repo, arch, filename)
// repo-add does this using symlinks, but we just change the requested
// path

View file

@ -44,7 +44,7 @@ pub fn server(conf Config) ? {
}
// This also creates the directories if needed
repo := repo.new(conf.data_dir, conf.pkg_dir, conf.default_arch) or {
repo := repo.new(conf.repos_dir, conf.pkg_dir, conf.default_arch) or {
logger.error(err.msg)
exit(1)
}