aboutsummaryrefslogtreecommitdiff
path: root/node_modules/parse-filepath/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/parse-filepath/index.js')
-rw-r--r--node_modules/parse-filepath/index.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/node_modules/parse-filepath/index.js b/node_modules/parse-filepath/index.js
index fce6f2c3a..0df01700c 100644
--- a/node_modules/parse-filepath/index.js
+++ b/node_modules/parse-filepath/index.js
@@ -53,7 +53,12 @@ module.exports = function(filepath) {
});
define(obj, 'dir', function() {
- return path.dirname(filepath);
+ var dir = path.dirname(filepath);
+ if (dir === '.') {
+ return (filepath[0] === '.') ? dir : '';
+ } else {
+ return dir;
+ }
});
define(obj, 'dirname', function() {