Hide zero-byte images until locally available - #1644
Open
reville wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Hide zero-byte supported images from RapidRAW's library until their contents are locally available.
Zero-byte image files cannot be decoded and commonly represent cloud-sync placeholders that have been listed locally before their provider downloads the actual bytes. Showing them produces broken thumbnails and load errors even though the remote original may be fine.
The check is provider-agnostic and cross-platform. RapidRAW reads fresh metadata on each scan, so an image automatically becomes discoverable on the next refresh after Dropbox, iCloud, or another provider hydrates it.
This is intentionally separate from #1643, but complements it: zero-byte placeholders are filtered consistently for every supported image format.
Type of Change
Changes Made
is_nonempty_supported_image_filediscovery predicate while preserving extension-only checks for pickers and file operations.Screenshots/Videos
Not applicable; the intended result is that unavailable zero-byte tiles no longer render.
Testing
Test Configuration:
Checks:
cargo test --manifest-path src-tauri/Cargo.toml --lib— 2 passedcargo check --manifest-path src-tauri/Cargo.tomlcargo fmt --manifest-path src-tauri/Cargo.toml -- --checkgit diff --checkcargo clippy --all-targets --all-features -- -D warnings -A clippy::collapsible_ifThe repository's unmodified
src-tauri/src/exif_processing.rscurrently triggers the pre-existingcollapsible_ifwarning under the exact strict Clippy command. With that unrelated baseline lint allowed, all targets and features pass Clippy with-D warnings.Checklist
Additional Notes
This deliberately checks for zero length rather than Dropbox- or iCloud-specific attributes. A zero-byte file cannot be a decodable image regardless of provider, while non-empty cloud entries keep RapidRAW's existing placeholder behavior.
AI Disclaimer