From 648d9e253c1924b832248f26fee42b2fb64dc3bc Mon Sep 17 00:00:00 2001 From: ᴜɴᴋɴᴡᴏɴ Date: Sat, 22 Feb 2020 09:05:26 +0800 Subject: conf: overhaul server settings (#5928) * conf: rename package * Requires Go 1.12 * Fix lint * Fix lint * Overhaul * db: fix tests * Save my work * Fix tests * Server.UnixSocketPermission * Server.LocalRootURL * SSH settings * Server.OfflineMode * Save my work * App.Version * Remove [server] STATIC_ROOT_PATH * Server.LandingURL --- internal/db/login_source.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'internal/db/login_source.go') diff --git a/internal/db/login_source.go b/internal/db/login_source.go index 383e8b46..22b53a62 100644 --- a/internal/db/login_source.go +++ b/internal/db/login_source.go @@ -11,7 +11,7 @@ import ( "net/smtp" "net/textproto" "os" - "path" + "path/filepath" "strings" "sync" "time" @@ -27,8 +27,8 @@ import ( "gogs.io/gogs/internal/auth/github" "gogs.io/gogs/internal/auth/ldap" "gogs.io/gogs/internal/auth/pam" + "gogs.io/gogs/internal/conf" "gogs.io/gogs/internal/db/errors" - "gogs.io/gogs/internal/setting" ) type LoginType int @@ -462,7 +462,7 @@ var localLoginSources = &LocalLoginSources{} // LoadAuthSources loads authentication sources from local files // and converts them into login sources. func LoadAuthSources() { - authdPath := path.Join(setting.CustomPath, "conf/auth.d") + authdPath := filepath.Join(conf.CustomDir(), "conf", "auth.d") if !com.IsDir(authdPath) { return } -- cgit v1.2.3