mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-04 15:58:49 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
9950848a4e
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
Add a link
Reference in a new issue