Fix hanlding trailing slash in asar package, close #2222

This commit is contained in:
Cheng Zhao 2015-07-16 03:48:35 -07:00
parent 78e55414d4
commit a2c26b8c74
2 changed files with 14 additions and 0 deletions

View file

@ -54,6 +54,11 @@ bool GetChildNode(const base::DictionaryValue* root,
const std::string& name,
const base::DictionaryValue* dir,
const base::DictionaryValue** out) {
if (name == "") {
*out = root;
return true;
}
const base::DictionaryValue* files = NULL;
return GetFilesNode(root, dir, &files) &&
files->GetDictionaryWithoutPathExpansion(name, out);