summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem/FileSystem.h
diff options
context:
space:
mode:
authorMax Wipfli <mail@maxwipfli.ch>2021-06-06 23:13:26 +0200
committerAndreas Kling <kling@serenityos.org>2021-06-08 12:15:04 +0200
commitc1de46aaaf2145c78103719e11ce2035cbd4128d (patch)
treeb3a9bceb4608fa2c0183b6ffe50c0abbb6df6a37 /Kernel/FileSystem/FileSystem.h
parent8930db0900ec90f927df7e21d8337a69f809105c (diff)
downloadserenity-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/FileSystem.h')
0 files changed, 0 insertions, 0 deletions