mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 17:47:36 +00:00
Assistant: Check for access before showing results
This commit is contained in:
parent
6f6a2dc319
commit
7c88ab2836
1 changed files with 7 additions and 1 deletions
|
@ -66,7 +66,9 @@ void URLResult::activate() const
|
|||
AppProvider::AppProvider()
|
||||
{
|
||||
Desktop::AppFile::for_each([this](NonnullRefPtr<Desktop::AppFile> app_file) {
|
||||
m_app_file_cache.append(move(app_file));
|
||||
if (access(app_file->executable().characters(), X_OK) == 0) {
|
||||
m_app_file_cache.append(move(app_file));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -224,6 +226,10 @@ void FileProvider::build_filesystem_cache()
|
|||
return IterationDecision::Continue;
|
||||
|
||||
auto full_path = LexicalPath::join(directory.path().string(), entry.name).string();
|
||||
|
||||
if (access(full_path.characters(), X_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