diff options
author | Max Wipfli <mail@maxwipfli.ch> | 2021-06-06 23:13:26 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-06-08 12:15:04 +0200 |
commit | c1de46aaaf2145c78103719e11ce2035cbd4128d (patch) | |
tree | b3a9bceb4608fa2c0183b6ffe50c0abbb6df6a37 /Kernel/FileSystem/Ext2FileSystem.cpp | |
parent | 8930db0900ec90f927df7e21d8337a69f809105c (diff) | |
download | serenity-c1de46aaaf2145c78103719e11ce2035cbd4128d.zip |
Kernel: Don't assume there are no nodes if m_unveiled_paths.is_empty()
If m_unveiled_paths.is_empty(), the root node (which is m_unveiled_paths
itself) is the matching veil. This means we should not return nullptr in
this case, but just use the code path for the general case.
This fixes a bug where calling e.g. unveil("/", "r") would refuse you
access to anything, because find_matching_unveiled_path would wrongly
return nullptr.
Since find_matching_unveiled_path can no longer return nullptr, we can
now just return a reference instead.
Diffstat (limited to 'Kernel/FileSystem/Ext2FileSystem.cpp')
0 files changed, 0 insertions, 0 deletions