mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-04 23:19:27 +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
|
@ -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…
Reference in a new issue