From 40d68e898dcf88fc69c635f7632a386877a20ea8 Mon Sep 17 00:00:00 2001 From: Sophie Herold Date: Wed, 3 Dec 2025 21:43:48 +0100 Subject: [PATCH] file_model: Check if is_hidden is support by fs Fixes #516 Issue #534 --- src/file_model.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/file_model.rs b/src/file_model.rs index e79e970..2a4788a 100644 --- a/src/file_model.rs +++ b/src/file_model.rs @@ -203,10 +203,17 @@ impl LpFileModel { if let Some(content_type) = content_type.and_then(|x| gio::content_type_get_mime_type(&x)) { + let hidden = + if info.has_attribute(gio::FILE_ATTRIBUTE_STANDARD_IS_HIDDEN) { + info.is_hidden() + } else { + false + }; + // Filter out non-images types. The final decision if images are // supported/kept will later be done by glycin when starting to load the // images. Usually by inspecting the magic bytes. - if content_type.starts_with("image/") && !info.is_hidden() { + if content_type.starts_with("image/") && !hidden { let file = directory.child(info.name()); new_files.insert(file.uri(), Entry::new(file).await); }