diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-01-22 21:04:36 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-01-22 21:04:36 +0100 |
commit | 877f2e477b010f9f37a9044606f110a90f077680 (patch) | |
tree | 5cd61cf3b00ba10dc6110535ed9fdf67d8baba72 /lib/utils/path.js | |
parent | c8e2fc0e57d223c01a51d6ee186fc1662cd74d13 (diff) | |
download | gitbook-877f2e477b010f9f37a9044606f110a90f077680.zip gitbook-877f2e477b010f9f37a9044606f110a90f077680.tar.gz gitbook-877f2e477b010f9f37a9044606f110a90f077680.tar.bz2 |
Start rewrite
Diffstat (limited to 'lib/utils/path.js')
-rw-r--r-- | lib/utils/path.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/utils/path.js b/lib/utils/path.js index 5285896..dc97d5d 100644 --- a/lib/utils/path.js +++ b/lib/utils/path.js @@ -1,5 +1,5 @@ -var _ = require("lodash"); -var path = require("path"); +var _ = require('lodash'); +var path = require('path'); // Return true if file path is inside a folder function isInRoot(root, filename) { @@ -26,8 +26,8 @@ function resolveInRoot(root) { result = path.resolve(root, input); if (!isInRoot(root, result)) { - err = new Error("EACCESS: \"" + result + "\" not in \"" + root + "\""); - err.code = "EACCESS"; + err = new Error('EACCESS: "' + result + '" not in "' + root + '"'); + err.code = 'EACCESS'; throw err; } |