Since we do ref counting on the nodes now, we can re-use the root nodes now
svn-id: r15851
This commit is contained in:
parent
eb44281ecb
commit
01cb15b9b2
6 changed files with 40 additions and 31 deletions
|
@ -197,11 +197,12 @@ const char *lastPathComponent(const Common::String &str) {
|
|||
|
||||
AbstractFilesystemNode *WindowsFilesystemNode::parent() const {
|
||||
assert(_isValid || _isPseudoRoot);
|
||||
WindowsFilesystemNode *p = new WindowsFilesystemNode();
|
||||
WindowsFilesystemNode *p = 0;
|
||||
if (!_isPseudoRoot && _path.size() > 3) {
|
||||
const char *start = _path.c_str();
|
||||
const char *end = lastPathComponent(_path);
|
||||
|
||||
p = new WindowsFilesystemNode();
|
||||
p->_path = String(start, end - start);
|
||||
p->_isValid = true;
|
||||
p->_isDirectory = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue