VFS: fix sys_fs_opendir on root
This commit is contained in:
+1
-1
@@ -130,7 +130,7 @@ std::string vfs::get(std::string_view vpath, std::vector<std::string>* out_dir)
|
|||||||
// Absolute path: finalize
|
// Absolute path: finalize
|
||||||
for (auto it = list.rbegin(), rend = list.rend(); it != rend; it++)
|
for (auto it = list.rbegin(), rend = list.rend(); it != rend; it++)
|
||||||
{
|
{
|
||||||
if (auto* dir = *it; dir && !dir->path.empty())
|
if (auto* dir = *it; dir && (!dir->path.empty() || list.size() == 1))
|
||||||
{
|
{
|
||||||
// Save latest valid mount path
|
// Save latest valid mount path
|
||||||
result_base = dir->path;
|
result_base = dir->path;
|
||||||
|
|||||||
Reference in New Issue
Block a user