mirror of
				https://gitea.com/gitea/tea.git
				synced 2025-10-31 01:05:26 +01:00 
			
		
		
		
	spdx (#581)
Co-authored-by: techknowlogick <hello@techknowlogick.com> Co-committed-by: techknowlogick <hello@techknowlogick.com>
This commit is contained in:
		 techknowlogick
					techknowlogick
				
			
				
					committed by
					
						 techknowlogick
						techknowlogick
					
				
			
			
				
	
			
			
			 techknowlogick
						techknowlogick
					
				
			
						parent
						
							2d57e07dc7
						
					
				
				
					commit
					b868d30434
				
			| @@ -1,13 +1,12 @@ | ||||
| // Copyright 2020 The Gitea Authors. All rights reserved. | ||||
| // Use of this source code is governed by a MIT-style | ||||
| // license that can be found in the LICENSE file. | ||||
| // SPDX-License-Identifier: MIT | ||||
|  | ||||
| package config | ||||
|  | ||||
| import ( | ||||
| 	"fmt" | ||||
| 	"io/ioutil" | ||||
| 	"log" | ||||
| 	"os" | ||||
| 	"path/filepath" | ||||
| 	"sync" | ||||
|  | ||||
| @@ -84,7 +83,7 @@ func loadConfig() (err error) { | ||||
| 		ymlPath := GetConfigPath() | ||||
| 		exist, _ := utils.FileExist(ymlPath) | ||||
| 		if exist { | ||||
| 			bs, err := ioutil.ReadFile(ymlPath) | ||||
| 			bs, err := os.ReadFile(ymlPath) | ||||
| 			if err != nil { | ||||
| 				err = fmt.Errorf("Failed to read config file: %s", ymlPath) | ||||
| 			} | ||||
| @@ -105,5 +104,5 @@ func saveConfig() error { | ||||
| 	if err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 	return ioutil.WriteFile(ymlPath, bs, 0o660) | ||||
| 	return os.WriteFile(ymlPath, bs, 0o660) | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user