Skip to content

Commit

Permalink
Create temp directories in the temp directory
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndrsn committed Jun 1, 2017
1 parent 971ec21 commit 5edcc89
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/sync-fs.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const fs = require('fs');
const os = require('os');
const path = require('path');
const trace = require('../lib/log').trace;
const warn = require('../lib/log').warn;
Expand Down Expand Up @@ -50,7 +51,7 @@ module.exports = {
copy: (from, to) => fs.writeFileSync(to, fs.readFileSync(from)),
exists: fs.existsSync,
mkdir: path => { try { fs.mkdirSync(path); } catch(e) { /* yum yum */ } },
mkdtemp: () => fs.mkdtempSync('medic-conf'),
mkdtemp: () => fs.mkdtempSync(`${os.tmpdir()}/medic-conf`),
read: read,
readJson: readJson,
readBinary: path => fs.readFileSync(path),
Expand Down

0 comments on commit 5edcc89

Please sign in to comment.