mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	fix #1383
This commit is contained in:
		
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@@ -5,6 +5,7 @@
 | 
			
		||||
package git
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"errors"
 | 
			
		||||
	"path/filepath"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
@@ -21,6 +22,8 @@ func OpenRepository(repoPath string) (*Repository, error) {
 | 
			
		||||
	repoPath, err := filepath.Abs(repoPath)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	} else if !isDir(repoPath) {
 | 
			
		||||
		return nil, errors.New("no such file or directory")
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return &Repository{Path: repoPath}, nil
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user