Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lost config after update (No uninstall handler for plugin system) #2

Closed
TCOTC opened this issue Dec 31, 2023 · 7 comments
Closed

Lost config after update (No uninstall handler for plugin system) #2

TCOTC opened this issue Dec 31, 2023 · 7 comments

Comments

@TCOTC
Copy link
Collaborator

TCOTC commented Dec 31, 2023

更新之后配置不显示了,但在 data\storage\petal\siyuan_rmv_btn 路径下还能找到3个文件存着配置。

按照一闪而过的蓝色提示(才看两行字提示就没了)重装了之后, data\storage\petal\siyuan_rmv_btn 路径下原本那三个配置文件也消失了。

image

image

@zxkmm
Copy link
Owner

zxkmm commented Dec 31, 2023

是的,抱歉,1.0.0版本重构了一次配置保存方式,原先的配置就失效了。建议卸载后重装一遍,以保证删除之前遗留的配置文件。如果想找回之前的配置,可以在卸载之前到工作空间/data/storage/petal/siyuan_rmv_btn 目录底下读取三个没有扩展名的文本文件。新的配置以json储存在同一目录。

@TCOTC
Copy link
Collaborator Author

TCOTC commented Dec 31, 2023

那三个文件在我重装插件之后就消失了,可能别人也会这样

@zxkmm
Copy link
Owner

zxkmm commented Dec 31, 2023

那三个文件在我重装插件之后就消失了,可能别人也会这样

谢谢提醒!我把删除配置写在onUnload这个handler里面,可能说思源更新插件会调用这个handler?有点奇怪。我昨天测试时候好像还挺正常的

@zxkmm
Copy link
Owner

zxkmm commented Dec 31, 2023

刚去看了一下 https://github.com/siyuan-note/siyuan/blob/171b91513423811cf1eedc827cf48e3a28c293b6/app/src/plugin/index.ts#L77 思源暂时没有提供卸载插件的handler, 所以为了保证旧的残留被删干净,现阶段可能只能这样写了。不过最新的那个json配置文件应该不管怎样操作都不会被删掉的。

@TCOTC TCOTC changed the title 更新之后配置直接没了 更新插件后上个版本的配置不显示,重装插件后上个版本的配置文件丢失 Jan 5, 2024
@zxkmm zxkmm changed the title 更新插件后上个版本的配置不显示,重装插件后上个版本的配置文件丢失 Lost config after update (No uninstall handler for plugin system) Jan 6, 2024
@zxkmm
Copy link
Owner

zxkmm commented Jan 10, 2024

Should be fixed in #5

@TCOTC
Copy link
Collaborator Author

TCOTC commented Jan 26, 2024

如果没其他问题的话,这个issue应该可以关闭了

@zxkmm zxkmm closed this as completed Jan 27, 2024
@zxkmm
Copy link
Owner

zxkmm commented Jan 27, 2024

谢谢,已关闭

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants