We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e0a04c commit f7f5a19Copy full SHA for f7f5a19
v2/pkgs/tools.go
@@ -246,8 +246,11 @@ func (t *Tools) Remove(ctx context.Context, payload *tools.ToolPayload) (*tools.
246
func rename(base string) extract.Renamer {
247
return func(path string) string {
248
parts := strings.Split(filepath.ToSlash(path), "/")
249
- path = strings.Join(parts[1:], "/")
250
- path = filepath.Join(base, path)
+ newPath := strings.Join(parts[1:], "/")
+ if newPath == "" {
251
+ newPath = filepath.Join(newPath, path)
252
+ }
253
+ path = filepath.Join(base, newPath)
254
return path
255
}
256
0 commit comments