1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-24 23:26:50 +02:00

Plugins: Add support for plugins.dataDir function, to provide a path for plugin to store its own data

This commit is contained in:
Laurent Cozic
2021-01-24 15:51:35 +00:00
parent 257cde4383
commit cbd842c268
7 changed files with 55 additions and 15 deletions

View File

@ -267,7 +267,9 @@ export default class PluginService extends BaseService {
const manifest = manifestFromObject(manifestObj);
const plugin = new Plugin(baseDir, manifest, scriptText, (action: any) => this.store_.dispatch(action));
const dataDir = `${Setting.value('pluginDataDir')}/${manifest.id}`;
const plugin = new Plugin(baseDir, manifest, scriptText, (action: any) => this.store_.dispatch(action), dataDir);
for (const msg of deprecationNotices) {
plugin.deprecationNotice('1.5', msg);