4

Electron 应用配置存储路径求教。

 1 year ago
source link: https://www.v2ex.com/t/913833
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

V2EX  ›  问与答

Electron 应用配置存储路径求教。

  fanchenio · 10 分钟前 · 18 次点击
是这样的,Electron 默认的应用存储路径一般都是 C:\Users\xxx\AppData\Roaming\AppName ,我开发完软件后,有用户提出,他在 C 盘安装了冰点还原工具,每次重启电脑后 C 盘就会重置,所以这就导致存储的应用数据就没有了,然后我想着增加一个配置可以修改应用存储路径,但是目前这个配置好的路径,我不知道存在哪里比较好,肯定不能放在 C 盘来记录这个路径了,因为每次重启都清空 C 盘,这个配置每次也都会被清空,存在应用根目录的话,我用的 electron-build ,每次更新软件的时候,应用目录会被清空,这个配置也清空了,目前想到两个,一个是存到环境变量里,一个是注册表里,大家还有其他的方案吗?求教,或者是说这两个方案用哪个比较好?

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK