Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/tmp.js
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ function _resolvePath(name, tmpDir, cb) {
cb(null, path.join(parentDir, path.basename(pathToResolve)));
});
} else {
fs.realpath(path, cb);
fs.realpath(pathToResolve, cb);
}
});
}
Expand Down
2 changes: 2 additions & 0 deletions test/inband-standard.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

var
fs = require('fs'),
os = require('os'),
path = require('path'),
assertions = require('./assertions'),
tmp = require('../lib/tmp');
Expand All @@ -18,6 +19,7 @@ module.exports = function inbandStandard(isFile, beforeHook, sync = false) {
describe('with mode', inbandStandardTests(null, { mode: 0o755 }, isFile, beforeHook, sync));
describe('with multiple options', inbandStandardTests(null, { prefix: 'tmp-multiple', postfix: 'bar', mode: 0o750 }, isFile, beforeHook, sync));
describe('with tmpdir option', inbandStandardTests(null, { tmpdir: path.join(tmp.tmpdir, 'tmp-external'), mode: 0o750 }, isFile, beforeHook, sync));
describe('with dir option', inbandStandardTests(null, { dir: os.tmpdir(), mode: 0o750 }, isFile, beforeHook, sync));
if (isFile) {
describe('with discardDescriptor', inbandStandardTests(null, { mode: testMode, discardDescriptor: true }, isFile, beforeHook, sync));
describe('with detachDescriptor', inbandStandardTests(null, { mode: testMode, detachDescriptor: true }, isFile, beforeHook, sync));
Expand Down
Loading