Implement lv2_mp_flag::cache

Identify /dev_hdd1 without unsafe path comparison.
This commit is contained in:
Nekotekina 2021-03-16 19:37:00 +03:00
parent f801dc6558
commit 8fcebebae3
4 changed files with 5 additions and 6 deletions

View file

@ -81,7 +81,7 @@ struct syscache_info
{
idm::select<lv2_fs_object, lv2_file>([](u32 /*id*/, lv2_file& file)
{
if (file.file && std::memcmp("/dev_hdd1/", file.name.data(), 10) == 0)
if (file.file && file.mp->flags & lv2_mp_flag::cache)
{
file.lock = 2;
}