mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-26 19:38:48 +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
|
|
@ -26,6 +26,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"
|
||||
|
|
@ -174,7 +175,7 @@ func InstallWidget(repoURL, repoHash, installPath string, systemID string) error
|
|||
}
|
||||
|
||||
func UninstallWidget(installPath string) error {
|
||||
if err := os.RemoveAll(installPath); nil != err {
|
||||
if err := filelock.Remove(installPath); nil != err {
|
||||
logging.LogErrorf("remove widget [%s] failed: %s", installPath, err)
|
||||
return errors.New("remove community widget failed")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue