Skip to content

Commit b3a8698

Browse files
authored
Update retriever.go
1 parent 6bb799e commit b3a8698

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/pkg/gitjacker/retriever.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ func (r *retriever) parsePackMetadata(meta []byte) error {
134134
for _, line := range lines {
135135
parts := strings.Split(strings.TrimSpace(line), " ")
136136
if parts[0] == "P" && len(parts) == 2 {
137-
if err := r.downloadFile(fmt.Sprintf("objects/pack/%s", parts[1])); err != nil {
137+
packPath := filepath.Join(r.outputDir, ".git", "objects", "pack", filepath.FromSlash(filepath.Clean("/"+parts[1])))
138+
if err := r.downloadFile(packPath)); err != nil {
138139
logrus.Debugf("Failed to retrieve pack file %s: %s", parts[1], err)
139140
}
140141
}

0 commit comments

Comments
 (0)