feat: Improve safety of get_entry function

- Wrap child access in unsafe block to prevent potential data races.
This commit is contained in:
Mahmoud Emad
2025-02-17 09:44:25 +00:00
parent acd1a4a61d
commit fa677c01b2

View File

@@ -171,7 +171,9 @@ fn (mut self OurDBVFS) get_entry(path string) !ourdb_fs.FSEntry {
if child.metadata.name == parts[i] {
match child {
ourdb_fs.Directory {
current = child
unsafe {
current = child
}
found = true
break
}