From eefa01f0f2a61d762916c560ca1e874003cd4737 Mon Sep 17 00:00:00 2001 From: Jare Guo Date: Fri, 3 Jun 2016 13:55:36 +0800 Subject: [PATCH] allow path ends with slash in loadResAll --- cocos2d/core/load-pipeline/asset-table.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cocos2d/core/load-pipeline/asset-table.js b/cocos2d/core/load-pipeline/asset-table.js index 692153ffdf..886261835a 100644 --- a/cocos2d/core/load-pipeline/asset-table.js +++ b/cocos2d/core/load-pipeline/asset-table.js @@ -75,6 +75,9 @@ cc.js.mixin(AssetTable.prototype, { getUuidArray: function (path, type) { path = cc.url.normalize(path); + if (path[path.length - 1] === '/') { + path = path.slice(0, -1); + } var path2uuid = this._pathToUuid; var uuids = []; var p, i;