diff options
author | Mikhail Mazurskiy <mmazurskiy@gitlab.com> | 2020-09-13 11:14:04 +0300 |
---|---|---|
committer | Mikhail Mazurskiy <mmazurskiy@gitlab.com> | 2020-09-13 11:14:04 +0300 |
commit | cc4aedb869cad2ca0493ac0048d4dab16f140de0 (patch) | |
tree | b6fa7bfe5503485efa9e6d8ec35b26af97a9beba /internal/gitaly/service/repository/apply_gitattributes.go | |
parent | e5dd5dfe799e1bf7dd0da9f6d314b880122fd8fa (diff) |
Use filepath package to manipulate file paths
Package path should be used to manipulate
abstract slash-delimited paths only,
not real file paths.
Diffstat (limited to 'internal/gitaly/service/repository/apply_gitattributes.go')
-rw-r--r-- | internal/gitaly/service/repository/apply_gitattributes.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/gitaly/service/repository/apply_gitattributes.go b/internal/gitaly/service/repository/apply_gitattributes.go index e3ea85a01..9a89aef9d 100644 --- a/internal/gitaly/service/repository/apply_gitattributes.go +++ b/internal/gitaly/service/repository/apply_gitattributes.go @@ -6,7 +6,7 @@ import ( "io" "io/ioutil" "os" - "path" + "path/filepath" "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/git/catfile" @@ -18,8 +18,8 @@ import ( const attributesFileMode os.FileMode = 0644 func applyGitattributes(c *catfile.Batch, repoPath string, revision []byte) error { - infoPath := path.Join(repoPath, "info") - attributesPath := path.Join(infoPath, "attributes") + infoPath := filepath.Join(repoPath, "info") + attributesPath := filepath.Join(infoPath, "attributes") _, err := c.Info(string(revision)) if err != nil { |