Skip to content

Commit

Permalink
Merge pull request #404 from jenkins-x/fakecontent
Browse files Browse the repository at this point in the history
fix: correct path response for fake content
  • Loading branch information
jenkins-x-bot committed Aug 17, 2023
2 parents b7a4ecc + 6e2f8ff commit d23a2b1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scm/driver/fake/content.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ func (c contentService) List(_ context.Context, repo, path, ref string) ([]*scm.
if f.IsDir() {
t = "dir"
}
path := filepath.Join(dir, name)
info, err := f.Info()
if err != nil {
return nil, nil, fmt.Errorf("cannot get info for file %s: %v", name, err)
Expand All @@ -68,11 +67,11 @@ func (c contentService) List(_ context.Context, repo, path, ref string) ([]*scm.

answer = append(answer, &scm.FileEntry{
Name: name,
Path: path,
Path: fmt.Sprintf("%s/%s", path, name),
Type: t,
Size: int(fSize),
Sha: ref,
Link: "file:https://" + path,
Link: "file:https://" + filepath.Join(dir, name),
})
}
return answer, nil, nil
Expand Down

0 comments on commit d23a2b1

Please sign in to comment.