From c0d14f9632864b62c9f9dfa158a72969a3a4c033 Mon Sep 17 00:00:00 2001 From: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com> Date: Tue, 24 Nov 2026 19:26:04 -0500 Subject: [PATCH] fix(xbox): an application element with attributes on the next line still counts (#3175) * fix(xbox): an application element with attributes on the next line still counts * fix(xbox): repair the patch hunk for the pretty-printed manifest test --- tools/xbox/droiddeck-legacy-install.patch | 35 +++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/tools/xbox/droiddeck-legacy-install.patch b/tools/xbox/droiddeck-legacy-install.patch index 7058294b13..b888a25587 100644 --- a/tools/xbox/droiddeck-legacy-install.patch +++ b/tools/xbox/droiddeck-legacy-install.patch @@ -154,7 +154,7 @@ new file mode 100755 index 0000000..d43c5fc --- /dev/null +++ b/crates/xodus-cli/src/commands/legacy_install.rs -@@ -0,0 +1,1375 @@ +@@ -0,0 +1,1406 @@ +//! Installs a legacy Store title: resolve, license, download, extract. +//! +//! `streaming` only understands MSIXVC, where the container *is* the game and @@ -1187,7 +1187,15 @@ index 0000000..d43c5fc + +fn declares_application(folder: &Path) -> bool { + let text = manifest_text(folder); -+ text.contains("` does not. ++fn opens_element(text: &str, tag: &str) -> bool { ++ text.match_indices(tag).any(|(at, _)| { ++ text[at + tag.len()..].chars().next().is_some_and(|next| next.is_whitespace() || next == '>' || next == '/') ++ }) +} + +/// Files a package container carries about itself. A bundle leaves its own copies at @@ -1392,6 +1400,29 @@ index 0000000..d43c5fc + } + + #[test] ++ fn hoist_recognises_an_application_whose_attributes_start_on_the_next_line() { ++ let root = scratch("pretty-printed"); ++ let app = root.join("Game.x64"); ++ std::fs::create_dir_all(&app).unwrap(); ++ std::fs::write(app.join(LEGACY_MANIFEST), " ++ ++ ++").unwrap(); ++ std::fs::write(app.join("Game.exe"), b"MZ").unwrap(); ++ let resource = root.join("Game.language-de"); ++ std::fs::create_dir_all(&resource).unwrap(); ++ std::fs::write(resource.join(LEGACY_MANIFEST), "").unwrap(); ++ ++ hoist(&root).unwrap(); ++ ++ assert!(root.join("Game.exe").is_file()); ++ assert!(opens_element("", "