mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
Assistant: Check for access before showing file results
Fixing up from #22597. This change checks whether a file is readable to the user before adding files to the cache.
This commit is contained in:
parent
bba53441ef
commit
b365356eba
Notes:
sideshowbarker
2024-07-16 22:26:05 +09:00
Author: https://github.com/hughdavenport
Commit: b365356eba
Pull-request: https://github.com/SerenityOS/serenity/pull/23075
1 changed files with 3 additions and 0 deletions
|
@ -224,6 +224,9 @@ void FileProvider::build_filesystem_cache()
|
|||
return IterationDecision::Continue;
|
||||
|
||||
auto full_path = LexicalPath::join(directory.path().string(), entry.name).string();
|
||||
if (access(full_path.characters(), R_OK) != 0)
|
||||
return IterationDecision::Continue;
|
||||
|
||||
m_full_path_cache.append(full_path);
|
||||
|
||||
if (S_ISDIR(st.st_mode)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue