mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Skip initing LFS storage if disabled (#21996)
A complement to #21985. I overlooked it because the name of the switch is `StartServer`, not `Enabled`. I believe the weird name is a legacy, but renaming is out of scope.
This commit is contained in:
		@@ -174,6 +174,10 @@ func initAttachments() (err error) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func initLFS() (err error) {
 | 
			
		||||
	if !setting.LFS.StartServer {
 | 
			
		||||
		LFS = discardStorage("LFS isn't enabled")
 | 
			
		||||
		return nil
 | 
			
		||||
	}
 | 
			
		||||
	log.Info("Initialising LFS storage with type: %s", setting.LFS.Storage.Type)
 | 
			
		||||
	LFS, err = NewStorage(setting.LFS.Storage.Type, &setting.LFS.Storage)
 | 
			
		||||
	return err
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user