File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -219,12 +219,14 @@ func RelativePath(ownerName, repoName string) string {
219219 return strings .ToLower (ownerName ) + "/" + strings .ToLower (repoName ) + ".git"
220220}
221221
222+ // RelativePath should be an unix style path like username/reponame.git
222223func (repo * Repository ) RelativePath () string {
223224 return RelativePath (repo .OwnerName , repo .Name )
224225}
225226
226227type StorageRepo string
227228
229+ // RelativePath should be an unix style path like username/reponame.git
228230func (sr StorageRepo ) RelativePath () string {
229231 return string (sr )
230232}
Original file line number Diff line number Diff line change @@ -20,8 +20,10 @@ type Repository interface {
2020 RelativePath () string // We don't assume how the directory structure of the repository is, so we only need the relative path
2121}
2222
23+ // RelativePath should be an unix style path like username/reponame.git
24+ // This method should change it according to the current OS.
2325func repoPath (repo Repository ) string {
24- return filepath .Join (setting .RepoRootPath , repo .RelativePath ())
26+ return filepath .Join (setting .RepoRootPath , filepath . FromSlash ( repo .RelativePath () ))
2527}
2628
2729// OpenRepository opens the repository at the given relative path with the provided context.
You can’t perform that action at this time.
0 commit comments