Item class has been moved to a new directory 'models', a new class has been added: ItemContent
and same fields from Item were moved to ItemContent Item - id - parent_id - type (file, dir, symlink) - url - subject - template (html template) - sort_index - content_id ItemContent - id - ref -> references (renamed) - user_id - modification_user_id - group_id - privileges - date_creation - date_modification - guest_name - link_to - link_redirect - file_path - file_fs - file_type - file_size - has_thumb -> file_has_thumb (renamed) - hash -> file_hash (renamed) - hash_type -> file_hash_type (renamed) - content -> content_raw (renamed) - content_type -> content_raw_type (renamed) - content_parsed - content_parsed_type - meta - ameta -> meta_admin (renamed) - modify_index (removed) WIP: #4
This commit is contained in:
@@ -233,7 +233,7 @@ void Mounts::ReadMounts(const std::wstring & mounts)
|
||||
|
||||
|
||||
// reading from /etc/fstab
|
||||
Error Mounts::ReadMounts()
|
||||
void Mounts::ReadMounts()
|
||||
{
|
||||
static std::wstring file = L"fstab";
|
||||
|
||||
@@ -242,27 +242,27 @@ Error Mounts::ReadMounts()
|
||||
if( !etc )
|
||||
{
|
||||
log << log1 << "M: there is no /etc directory" << logend;
|
||||
return WINIX_ERR_NO_ITEM;
|
||||
return;
|
||||
}
|
||||
|
||||
Item fstab;
|
||||
Error err = db->GetItem(etc->id, file, fstab);
|
||||
morm::Finder<Item> finder(model_connector);
|
||||
Item fstab = finder.select().where().eq(L"parent_id", etc->id).eq(L"url", file).get();
|
||||
|
||||
if( err == WINIX_ERR_NO_ITEM )
|
||||
// Error err = db->GetItem(etc->id, file, fstab);
|
||||
|
||||
if( !fstab.found() )
|
||||
{
|
||||
log << log1 << "M: there is no /etc/fstab file" << logend;
|
||||
return err;
|
||||
return;
|
||||
}
|
||||
|
||||
if( err != WINIX_ERR_OK )
|
||||
{
|
||||
log << log1 << "M: cannot read /etc/fstab" << logend;
|
||||
return err;
|
||||
}
|
||||
// if( err != WINIX_ERR_OK )
|
||||
// {
|
||||
// log << log1 << "M: cannot read /etc/fstab" << logend;
|
||||
// return err;
|
||||
// }
|
||||
|
||||
ReadMounts(fstab.content);
|
||||
|
||||
return WINIX_ERR_OK;
|
||||
ReadMounts(fstab.item_content.content_raw);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user