mirror of
https://github.com/corda/corda.git
synced 2025-01-16 17:59:46 +00:00
strip leading slashes from path in JarElement::find()/exists()
This commit is contained in:
parent
36f1d3206e
commit
3838cd0e68
@ -302,6 +302,7 @@ class JarIndex {
|
||||
abort(s);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -339,11 +340,17 @@ class JarElement: public Element {
|
||||
|
||||
virtual System::Region* find(const char* name) {
|
||||
init();
|
||||
|
||||
while (*name == '/') name++;
|
||||
|
||||
return (index ? index->find(name) : 0);
|
||||
}
|
||||
|
||||
virtual bool exists(const char* name) {
|
||||
init();
|
||||
|
||||
while (*name == '/') name++;
|
||||
|
||||
return (index ? index->exists(name) : 0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user