mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
🐛 Uninstalling plugins, widgets and templates may cause data sync errors https://github.com/siyuan-note/siyuan/issues/10324
This commit is contained in:
parent
fe9e261feb
commit
745c9bcf99
7 changed files with 14 additions and 12 deletions
|
|
@ -27,6 +27,7 @@ import (
|
|||
|
||||
"github.com/dustin/go-humanize"
|
||||
ants "github.com/panjf2000/ants/v2"
|
||||
"github.com/siyuan-note/filelock"
|
||||
"github.com/siyuan-note/httpclient"
|
||||
"github.com/siyuan-note/logging"
|
||||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
|
|
@ -214,7 +215,7 @@ func InstallPlugin(repoURL, repoHash, installPath string, systemID string) error
|
|||
}
|
||||
|
||||
func UninstallPlugin(installPath string) error {
|
||||
if err := os.RemoveAll(installPath); nil != err {
|
||||
if err := filelock.Remove(installPath); nil != err {
|
||||
logging.LogErrorf("remove plugin [%s] failed: %s", installPath, err)
|
||||
return errors.New("remove community plugin failed")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue