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

Desktop, Cli: Resolves #1932: Use profile temp dir when exporting files

This commit is contained in:
Laurent Cozic
2019-10-02 19:22:32 +01:00
parent 5d015bf746
commit 02eb2f2e45
2 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,5 @@
const Setting = require('lib/models/Setting');
class InteropService_Importer_Base {
setMetadata(md) {
this.metadata_ = md;
@ -16,7 +18,7 @@ class InteropService_Importer_Base {
async temporaryDirectory_(createIt) {
const md5 = require('md5');
const tempDir = `${require('os').tmpdir()}/${md5(Math.random() + Date.now())}`;
const tempDir = `${Setting.value('tempDir')}/${md5(Math.random() + Date.now())}`;
if (createIt) await require('fs-extra').mkdirp(tempDir);
return tempDir;
}