Don't leave empty paths with a trailing slash

This commit is contained in:
Kevin Sawicki
2014-10-13 16:51:32 -04:00
parent 826681b6c2
commit 5052aaca95

View File

@@ -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