You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-16 00:14:34 +02:00
Desktop: Trying to fix issue with permission errors when installing a plugin
This commit is contained in:
@ -584,7 +584,17 @@ export default class PluginService extends BaseService {
|
|||||||
// from where it is now to check that it is valid and to retrieve
|
// from where it is now to check that it is valid and to retrieve
|
||||||
// the plugin ID.
|
// the plugin ID.
|
||||||
const preloadedPlugin = await this.loadPluginFromPath(jplPath);
|
const preloadedPlugin = await this.loadPluginFromPath(jplPath);
|
||||||
await this.deletePluginFiles(preloadedPlugin);
|
try {
|
||||||
|
await this.deletePluginFiles(preloadedPlugin);
|
||||||
|
} catch (error) {
|
||||||
|
// Deleting the plugin appears to occasionally fail on Windows (maybe because the files
|
||||||
|
// are still loaded?), and it prevents the plugin from being installed. Because of this
|
||||||
|
// we just ignore the error - it means that there will be unnecessary files in the cache
|
||||||
|
// directory, which is not a big issue.
|
||||||
|
//
|
||||||
|
// Ref: https://discourse.joplinapp.org/t/math-mode-plugin-no-longer-works-in-windows-v3-1-23/41853
|
||||||
|
logger.warn('Could not delete plugin temp directory:', error);
|
||||||
|
}
|
||||||
|
|
||||||
// On mobile, it's necessary to create the plugin directory before we can copy
|
// On mobile, it's necessary to create the plugin directory before we can copy
|
||||||
// into it.
|
// into it.
|
||||||
|
Reference in New Issue
Block a user