@smbcloud / smbcloud-ascapi Mirror · read-only / commits / 0a25254
Fork 0

Read-only mirror of github.com/smbcloudXYZ/smbcloud-ascapi.

Mirrored from https://github.com/smbcloudXYZ/smbcloud-ascapi.git

Synced Nov 25, 09:15 UTC

Apply the screenshot count check

The previous commit added the 3 to 8 constants and tests, but the check itself still only capped the count at the old maximum, so two screenshots passed and the test failed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Seto Elkahfi committed Oct 27, 2026 at 16:31 UTC 0a252546f3015f45b3ae5fd54a329890e9cc6da7
1 file changed +4 -2
crates/frontend/src/appgallery.rs
+4 -2
@@ -293,9 +293,11 @@ fn check_files(kind: FileType, paths: &[std::path::PathBuf]) -> Result<(), Strin
293 match kind {
294 FileType::Icon => one("an icon")?,
295 FileType::Package => one("a package")?,
296 - FileType::Screenshots | FileType::VrScreenshots if paths.len() > MAX_SCREENSHOTS => {
296 + FileType::Screenshots | FileType::VrScreenshots
297 + if !(MIN_SCREENSHOTS..=MAX_SCREENSHOTS).contains(&paths.len()) =>
298 + {
299 return Err(format!(
298 - "at most {MAX_SCREENSHOTS} screenshots per language"
300 + "{MIN_SCREENSHOTS} to {MAX_SCREENSHOTS} screenshots per language; binding replaces the whole set"
301 ))
302 }
303 FileType::IntroVideo if !paths.len().is_multiple_of(2) || paths.len() > 6 => {