path.resolve already takes care of path.join

This commit is contained in:
Girish Ramakrishnan
2013-09-07 23:36:52 -07:00
parent 05fe38512d
commit c627a1fc07
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -312,7 +312,7 @@ Repo.prototype.indexEntries = function (options, callback) {
};
Repo.prototype._absoluteFilePath = function (filePath) {
var absoluteFilePath = path.resolve(path.join(this.checkoutDir, filePath));
var absoluteFilePath = path.resolve(this.checkoutDir, filePath);
return absoluteFilePath.slice(0, this.checkoutDir.length) == this.checkoutDir
? absoluteFilePath
: ''; // the path is outside the repo
+3 -3
View File
@@ -26,9 +26,9 @@ var basePath = os.tmpdir();
var config = {
port: 3000,
dataRoot: path.resolve(path.join(basePath, '/yellowtent/data')),
configRoot: path.resolve(path.join(basePath, '/yellowtent/config')),
mountRoot: path.resolve(path.join(basePath, '/yellowtent/mount'))
dataRoot: path.resolve(basePath, 'yellowtent/data'),
configRoot: path.resolve(basePath, 'yellowtent/config'),
mountRoot: path.resolve(basePath, 'yellowtent/mount')
};
function cleanup(done) {