From caedb7e8f092df7d04e335d4162b31c67d69930a Mon Sep 17 00:00:00 2001 From: rhpidfyre Date: Wed, 12 Mar 2025 16:36:05 -0400 Subject: [PATCH] `push` and `find` should use `read_write_access` since they read the names of inner --- src/rt/rfwfs/main.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rt/rfwfs/main.ts b/src/rt/rfwfs/main.ts index b50759a..88f49d5 100644 --- a/src/rt/rfwfs/main.ts +++ b/src/rt/rfwfs/main.ts @@ -63,7 +63,7 @@ function directory_sort(self: EntryCollectionManipulate) { } function directory_push(self: EntryCollection, entry: E): WrapResultNone { - if (write_access(self.permissions)) { + if (read_write_access(self.permissions)) { const no_duplicates = directory_search(self.inner.__inner, entry.name.read()) if (!no_duplicates) { self.inner.__inner.push(entry) @@ -76,7 +76,7 @@ function directory_push(self: EntryCollection, entry: E): Wr } function directory_find(self: EntryCollection, file_name: string): WrapResultEntry { - if (read_access(self.permissions)) { + if (read_write_access(self.permissions)) { const file_search = directory_search(self.inner.__inner, file_name) if (file_search) { return wrap_entry(ReadStatus.Ok, file_search.result)