mirror of
https://github.com/grdl/git-get.git
synced 2026-02-04 23:49:42 +00:00
Replace path.Join with filepath.Join
Path is for URLs, filepath is for os paths. This solves the problem with wrong repo root on windows.
This commit is contained in:
@@ -2,7 +2,7 @@ package pkg
|
||||
|
||||
import (
|
||||
urlpkg "net/url"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
@@ -67,7 +67,7 @@ func URLToPath(url *urlpkg.URL) (repoPath string) {
|
||||
repoHost := strings.Split(url.Host, ":")[0]
|
||||
|
||||
// Remove trailing ".git" from repo name
|
||||
repoPath = path.Join(repoHost, url.Path)
|
||||
repoPath = filepath.Join(repoHost, url.Path)
|
||||
repoPath = strings.TrimSuffix(repoPath, ".git")
|
||||
|
||||
// Remove tilde (~) char from username
|
||||
|
||||
Reference in New Issue
Block a user