fixed: winix_subdomain ezc function

didn't print the subdomain
added: to rm winix function:
       bool Rm::RemoveItemByPath(const std::wstring & path, bool check_access)
fixed: in Upload winix function
       when uploading an image we have to get
       a mount point where the image is placed (parent dir)
       (it was cur->mount beforehand)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@844 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2012-06-03 02:14:33 +00:00
parent b605fb0a77
commit 86d6c96aeb
4 changed files with 66 additions and 24 deletions

View File

@@ -216,8 +216,10 @@ return RemoveFile(item);
// for other uses (plugins etc)
void Rm::RemoveItemById(long item_id, bool check_access)
bool Rm::RemoveItemById(long item_id, bool check_access)
{
bool result = false;
// selecting files, symlinks and directories
rm_by_id_iq.SetAll(false, false);
rm_by_id_iq.sel_parent_id = true;
@@ -233,14 +235,49 @@ void Rm::RemoveItemById(long item_id, bool check_access)
if( db->GetItem(rm_by_id_item, rm_by_id_iq) == WINIX_ERR_OK )
{
if( rm_by_id_item.type == Item::dir )
{
RemoveDirTree(rm_by_id_item, true, check_access);
result = true; // RemoveDirTree doesn't return a status
}
else
RemoveFileOrSymlink(rm_by_id_item, check_access);
{
result = RemoveFileOrSymlink(rm_by_id_item, check_access);
}
}
return result;
}
bool Rm::RemoveItemByPath(const std::wstring & path, bool check_access)
{
bool result = false;
int res = system->FollowAllLinks(path, rm_path_dir_tab, rm_path_item);
if( res == 0 )
{
Item * dir = system->dirs.GetDir(rm_path_dir_tab.back()->id);
if( dir )
{
RemoveDirTree(*dir, true, check_access);
result = false;
}
}
else
if( res == 1 )
{
result = RemoveFileOrSymlink(rm_path_item, check_access);
}
return result;
}
bool Rm::RemoveDirFiles(long dir_id, bool check_access)
{
content_dir_iq.WhereParentId(dir_id);