mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Remove unnecassary calls to filepath.Join (#17608)
				
					
				
			- Partialy resolvess #17596 - Resolves `badCall` errors from go-critic `badCall: suspicious Join on 1 argument` - When only 1 argument is passed into `filepath.Join`, it won't do anything special other than `filepath.Clean(...)` will be applied over it. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
		@@ -154,7 +154,7 @@ func ListUnadoptedRepositories(query string, opts *db.ListOptions) ([]string, in
 | 
			
		||||
	count := 0
 | 
			
		||||
 | 
			
		||||
	// We're going to iterate by pagesize.
 | 
			
		||||
	root := filepath.Join(setting.RepoRootPath)
 | 
			
		||||
	root := filepath.Clean(setting.RepoRootPath)
 | 
			
		||||
	if err := filepath.Walk(root, func(path string, info os.FileInfo, err error) error {
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			return err
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user