mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 11:28:24 +00:00 
			
		
		
		
	Set default lfs content path (#2521)
This commit is contained in:
		| @@ -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 { | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user