path.resolve already takes care of path.join
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user