Skip to content

Commit f69a7b0

Browse files
committed
use trim left instead of trim prefix to get all the slashes
1 parent 53bfe05 commit f69a7b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

files.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ func (x *XFile) squashRoot(files []string) ([]string, error) {
568568

569569
for _, path := range files {
570570
// Remove the output dir suffix, then split on `/` (or `\`) and get the first item.
571-
newRoot := strings.TrimPrefix(strings.TrimPrefix(path, x.OutputDir), string(filepath.Separator))
571+
newRoot := strings.TrimLeft(strings.TrimPrefix(path, x.OutputDir), string(filepath.Separator))
572572
roots[strings.SplitN(newRoot, string(filepath.Separator), 2)[0]] = struct{}{} //nolint:mnd
573573
}
574574

0 commit comments

Comments
 (0)