1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-12-02 22:49:09 +02:00

Desktop: Fixes #1425: Improved handling of images when using external editor, so that it works in Atom, VSCode and Typora

This commit is contained in:
Laurent Cozic
2019-05-11 11:46:13 +01:00
parent 91ecab51c5
commit b702b0b40c
7 changed files with 36 additions and 16 deletions

View File

@@ -511,11 +511,13 @@ class BaseApplication {
Setting.setConstant('appName', appName);
const profileDir = this.determineProfileDir(initArgs);
const resourceDir = profileDir + '/resources';
const resourceDirName = 'resources';
const resourceDir = profileDir + '/' + resourceDirName;
const tempDir = profileDir + '/tmp';
Setting.setConstant('env', initArgs.env);
Setting.setConstant('profileDir', profileDir);
Setting.setConstant('resourceDirName', resourceDirName);
Setting.setConstant('resourceDir', resourceDir);
Setting.setConstant('tempDir', tempDir);
@@ -525,6 +527,9 @@ class BaseApplication {
await fs.mkdirp(resourceDir, 0o755);
await fs.mkdirp(tempDir, 0o755);
// Clean up any remaining watched files (they start with "edit-")
await shim.fsDriver().removeAllThatStartWith(profileDir, 'edit-');
const extraFlags = await this.readFlagsFromFile(profileDir + '/flags.txt');
initArgs = Object.assign(initArgs, extraFlags);