From 17ae0ed3eef54d96bd179ff7fec0540cf3024748 Mon Sep 17 00:00:00 2001 From: ᴜɴᴋɴᴡᴏɴ Date: Sat, 29 Feb 2020 16:29:17 +0800 Subject: conf: overhaul settings (#5953) * Overhaul cache settings * Overhaul HTTP settings * conf: overhaul more settings * log: make LGTM happy * travis: upload report to Codecov * Add codecov.yml --- internal/db/repo.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/db/repo.go') diff --git a/internal/db/repo.go b/internal/db/repo.go index ca29e305..e3d881d0 100644 --- a/internal/db/repo.go +++ b/internal/db/repo.go @@ -296,7 +296,7 @@ func (repo *Repository) HTMLURL() string { // CustomAvatarPath returns repository custom avatar file path. func (repo *Repository) CustomAvatarPath() string { - return filepath.Join(conf.RepositoryAvatarUploadPath, com.ToStr(repo.ID)) + return filepath.Join(conf.Picture.RepositoryAvatarUploadPath, com.ToStr(repo.ID)) } // RelAvatarLink returns relative avatar link to the site domain, @@ -327,7 +327,7 @@ func (repo *Repository) UploadAvatar(data []byte) error { return fmt.Errorf("decode image: %v", err) } - _ = os.MkdirAll(conf.RepositoryAvatarUploadPath, os.ModePerm) + _ = os.MkdirAll(conf.Picture.RepositoryAvatarUploadPath, os.ModePerm) fw, err := os.Create(repo.CustomAvatarPath()) if err != nil { return fmt.Errorf("create custom avatar directory: %v", err) -- cgit v1.2.3