Skip to content

Incorrect Appx filtering results when the -e parameter is specified but not -l #277

@BlueRain-debug

Description

@BlueRain-debug

There is a logic error in src/CompDB/Applications/AppxSelectionEngine.cs#L499 public static PackageProperties[] GetAppxFilesToKeep(CompDB editionCdb, IEnumerable appsCdbs, string editionLanguage).

The issue manifests when the caller (DownloadHelpers.cs) passes an empty Language string. This happens when the user specifies a sku but leaves the language empty.

Caller: src/UnifiedUpdatePlatform.Services.WindowsUpdate.Downloads/DownloadHelpers.cs#L334

When the condition is (false, true) (Language is empty), the code calls AppxSelectionEngine.GetAppxFilesToKeep(cdb, AppCompDBs, Language) with an empty Language string.

Since editionLanguage is empty, GetAppxFilesToKeep fails to match any valid language resource packages.

Expected Behavior
Inside GetAppxFilesToKeep, if editionLanguage is empty (or null), it should skip the language filtering.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions