🐛 Compat with old bazaar pkg
This commit is contained in:
parent
4312e46d27
commit
397683d567
1 changed files with 1 additions and 2 deletions
|
@ -576,14 +576,13 @@ func installPackage(data []byte, installPath string) (err error) {
|
|||
return
|
||||
}
|
||||
|
||||
dirName := filepath.Base(installPath)
|
||||
dirs, err := os.ReadDir(unzipPath)
|
||||
if nil != err {
|
||||
return
|
||||
}
|
||||
|
||||
srcPath := unzipPath
|
||||
if 1 == len(dirs) && dirs[0].IsDir() && strings.HasPrefix(dirs[0].Name(), dirName+"-") {
|
||||
if 1 == len(dirs) && dirs[0].IsDir() {
|
||||
srcPath = filepath.Join(unzipPath, dirs[0].Name())
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue