Skip .DS_Store files when looking for extension directories (#10046)

This PR makes it so `.DS_Store` files are skipped when trying to load
extension directories.

Previously it would fail and log an error.

Release Notes:

- Fixed an issue where the presence of a `.DS_Store` file in the
extensions directory would produce an error in the logs.
This commit is contained in:
Marshall Bowers 2024-04-01 13:34:00 -04:00 committed by GitHub
parent 30fad09dac
commit aa76182ca7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1107,6 +1107,14 @@ impl ExtensionStore {
let Ok(extension_dir) = extension_dir else {
continue;
};
if extension_dir
.file_name()
.map_or(false, |file_name| file_name == ".DS_Store")
{
continue;
}
Self::add_extension_to_index(fs.clone(), extension_dir, &mut index)
.await
.log_err();