mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-10-05 22:02:38 +00:00
Fix ttvfs bugs, sync with dev repo
This commit is contained in:
parent
6203bc7ce4
commit
b437a7cb2c
13 changed files with 84 additions and 108 deletions
|
@ -42,6 +42,9 @@ void InternalDir::close()
|
|||
|
||||
void InternalDir::_addMountDir(CountedPtr<DirBase> d)
|
||||
{
|
||||
if(d.content() == this)
|
||||
return;
|
||||
|
||||
// move to end of vector if already mounted
|
||||
for(MountedDirs::iterator it = _mountedDirs.begin(); it != _mountedDirs.end(); ++it)
|
||||
if(*it == d)
|
||||
|
@ -162,7 +165,15 @@ bool InternalDir::_addToView(char *path, DirView& view)
|
|||
return added;
|
||||
}
|
||||
|
||||
File *InternalDir::getFileFromSubdir(const char *subdir, const char *file)
|
||||
{
|
||||
for(MountedDirs::reverse_iterator it = _mountedDirs.rbegin(); it != _mountedDirs.rend(); ++it)
|
||||
if(File* f = (*it)->getFileFromSubdir(subdir, file))
|
||||
return f;
|
||||
|
||||
InternalDir *d = safecast<InternalDir*>(DirBase::getDirByName(subdir, false, false)); // vcall not required here
|
||||
return d ? d->getFile(file) : NULL;
|
||||
}
|
||||
|
||||
|
||||
VFS_NAMESPACE_END
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue