From 5052aaca955f1a7cffffebf0dafa742b654b54bc Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 13 Oct 2014 16:51:32 -0400 Subject: [PATCH] Don't leave empty paths with a trailing slash --- src/module-cache.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/module-cache.coffee b/src/module-cache.coffee index bbb3ec18b..f1f3c2a54 100644 --- a/src/module-cache.coffee +++ b/src/module-cache.coffee @@ -239,7 +239,10 @@ exports.add = (directoryPath, metadata) -> for entry in cacheToAdd?.folders ? [] for folderPath in entry.paths - cache.folders["#{directoryPath}#{path.sep}#{folderPath}"] = entry.dependencies + if folderPath + cache.folders["#{directoryPath}#{path.sep}#{folderPath}"] = entry.dependencies + else + cache.folders["#{directoryPath}"] = entry.dependencies if directoryPath is cache.resourcePath for extension, paths of cacheToAdd?.extensions