Skip to content
Browse files

Merge branch 'master' of git://github.com/nicjansma/versionator

Conflicts:
	test/map-path.test.js
  • Loading branch information...
2 parents 92ee669 + 74e0163 commit 2a33c21ec649069420724ba0cbefde21a07d8fa4 @serby committed Aug 1, 2013
Showing with 6 additions and 1 deletion.
  1. +5 −0 lib/map-path.js
  2. +1 −1 test/map-path.test.js
View
5 lib/map-path.js
@@ -25,6 +25,11 @@ module.exports = function(dirPath, params, callback) {
return callback(new Error('Path is required'))
}
+ // trim trailing slash
+ if (dirPath.substring(dirPath.length - 1) === '/') {
+ dirPath = dirPath.slice(0, -1);
+ }
+
function hash(filename, callback) {
var
md5sum = crypto.createHash('md5'),
View
2 test/map-path.test.js
@@ -113,4 +113,4 @@ describe('versionator', function() {
after(function(done) {
removeFiles(tmpPath, files, done);
});
-});
+});

0 comments on commit 2a33c21

Please sign in to comment.
Something went wrong with that request. Please try again.