Skip to content

Commit

Permalink
Merge pull request #1146 from nanovms/fix/target-root-addlibrary
Browse files Browse the repository at this point in the history
Remove target root prefix path from library path
  • Loading branch information
sanderssj authored Aug 10, 2021
2 parents 842992f + 7a36f81 commit e65d2e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ func (m *Manifest) AddFileTo(dir map[string]interface{}, filepath string, hostpa

// AddLibrary to add a dependent library
func (m *Manifest) AddLibrary(path string) {
parts := strings.FieldsFunc(path, func(c rune) bool { return c == '/' })
parts := strings.FieldsFunc(strings.TrimPrefix(path, m.targetRoot), func(c rune) bool { return c == '/' })
node := m.rootDir()
for i := 0; i < len(parts)-1; i++ {
node = mkDir(node, parts[i])
Expand Down

0 comments on commit e65d2e5

Please sign in to comment.