added: new winix function: mount
displaying all mount points changed: struct Cur has now 'mount' pointer we should not use system->mounts.pmount now (it will be removed in the future) changed: all mount point parameters are now propagated to childs mount points (if not defined there) git-svn-id: svn://ttmath.org/publicrep/winix/trunk@745 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -208,7 +208,6 @@ size_t level = 0;
|
||||
if( i == dir_tab.End() ||
|
||||
i->parent_id == id ) // means a loop (something wrong in the db)
|
||||
{
|
||||
// we don't change path if there is no such a directory
|
||||
return level;
|
||||
}
|
||||
|
||||
@@ -221,6 +220,30 @@ size_t level = 0;
|
||||
}
|
||||
|
||||
|
||||
bool Dirs::IsChild(long parent_id, long child_id)
|
||||
{
|
||||
if( child_id == parent_id )
|
||||
return false;
|
||||
|
||||
DirContainer::Iterator i;
|
||||
|
||||
while( child_id != -1 )
|
||||
{
|
||||
i = dir_tab.FindId(child_id);
|
||||
|
||||
if( i == dir_tab.End() )
|
||||
return false;
|
||||
|
||||
if( i->parent_id == parent_id )
|
||||
return true;
|
||||
|
||||
child_id = i->parent_id;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool Dirs::ChangeParent(long dir_id, long new_parent_id)
|
||||
{
|
||||
return dir_tab.ChangeParent(dir_id, new_parent_id);
|
||||
|
Reference in New Issue
Block a user