Skip to content

Commit

Permalink
Set default lfs content path
Browse files Browse the repository at this point in the history
  • Loading branch information
cez81 committed Oct 17, 2017
1 parent ccd3577 commit aab6be6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/setting/setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -740,9 +740,14 @@ func NewContext() {
SSH.AuthorizedKeysBackup = sec.Key("SSH_AUTHORIZED_KEYS_BACKUP").MustBool(true)
SSH.ExposeAnonymous = sec.Key("SSH_EXPOSE_ANONYMOUS").MustBool(false)

if err = Cfg.Section("server").MapTo(&LFS); err != nil {
sec = Cfg.Section("server")
if err = sec.MapTo(&LFS); err != nil {
log.Fatal(4, "Failed to map LFS settings: %v", err)
}
LFS.ContentPath = sec.Key("LFS_CONTENT_PATH").MustString(filepath.Join(AppDataPath, "lfs"))
if !filepath.IsAbs(LFS.ContentPath) {
LFS.ContentPath = filepath.Join(workDir, LFS.ContentPath)
}

if LFS.StartServer {

Expand Down

0 comments on commit aab6be6

Please sign in to comment.