6
0
mirror of https://github.com/grdl/git-get.git synced 2026-02-05 16:33:48 +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:
Grzegorz Dlugoszewski
2020-06-30 11:25:49 +02:00
parent b8606568ef
commit 235ea0d811
4 changed files with 10 additions and 10 deletions

View File

@@ -4,7 +4,7 @@ import (
"fmt"
"git-get/pkg/git"
"git-get/pkg/io"
"path"
"path/filepath"
)
// GetCfg provides configuration for the Get command.
@@ -40,7 +40,7 @@ func cloneSingleRepo(c *GetCfg) error {
opts := &git.CloneOpts{
URL: url,
Path: path.Join(c.Root, URLToPath(url)),
Path: filepath.Join(c.Root, URLToPath(url)),
Branch: c.Branch,
}
@@ -63,7 +63,7 @@ func cloneDumpFile(c *GetCfg) error {
opts := &git.CloneOpts{
URL: url,
Path: path.Join(c.Root, URLToPath(url)),
Path: filepath.Join(c.Root, URLToPath(url)),
Branch: line.branch,
}