Skip to content

Commit

Permalink
Tests pass when run individually too
Browse files Browse the repository at this point in the history
  • Loading branch information
danactive committed Oct 17, 2016
1 parent 1cccf0b commit 50f8c43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion plugins/exists/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function pathExists(verifyPath) {
reject(boom.notFound(`${moduleName} module: File system path is missing (${verifyPath})`));
}

const verifiedPath = path.isAbsolute(verifyPath) ? verifyPath : path.resolve('../', verifyPath);
const verifiedPath = path.isAbsolute(verifyPath) ? verifyPath : path.resolve(__dirname, '../../../', verifyPath);

fs.stat(verifiedPath, (error, type) => {
if (error) {
Expand Down
6 changes: 3 additions & 3 deletions plugins/rename/lib/rename.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ Renamed file paths
@param {string} [sourceFolder] Folder that contains the raw camera photo files
@param {string[]} [filenames] Current filenames (file and extension) of raw camera photo files
@param {string[]} [futureFilenames] Future filenames (file and extension) of renamed camera photo files
@param {object} options Additional optional options
@param {bool} options.renameAssociated Find matching files with different extensions, then rename them
@param {object} _options Additional optional options
@param {bool} _options.renameAssociated Find matching files with different extensions, then rename them
@return {Promise}
**/
function renamePaths(sourceFolder, filenames, futureFilenames, _options) {
Expand All @@ -85,7 +85,7 @@ function renamePaths(sourceFolder, filenames, futureFilenames, _options) {
}, 2);

{
const fullPath = path.resolve(path.join('../', sourceFolder));
const fullPath = path.resolve(path.resolve(__dirname, '../../../', sourceFolder));

const transformFilenames = (pair, cb) => {
if (options.renameAssociated) {
Expand Down

0 comments on commit 50f8c43

Please sign in to comment.