Skip to content

Commit f405dc2

Browse files
author
Claude
committed
fix: use filepath.Join for cross-platform path construction
Signed-off-by: Claude <[email protected]>
1 parent c6ce702 commit f405dc2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/storage/git/repository.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"fmt"
66
"maps"
77
"os"
8+
"path/filepath"
89
"slices"
910
"strings"
1011
"sync"
@@ -139,7 +140,7 @@ func newRepository(ctx context.Context, logger *zap.Logger, opts ...containers.O
139140
}
140141
} else {
141142
// Directory has content - check if it has a .git subdirectory (normal repo) or bare repo files
142-
gitDir := r.localPath + "/.git"
143+
gitDir := filepath.Join(r.localPath, ".git")
143144
if _, err := os.Stat(gitDir); err == nil {
144145
// .git subdirectory exists - this is a normal Git repository
145146
r.Repository, err = git.PlainOpen(r.localPath)

0 commit comments

Comments
 (0)