Skip to content

KSPedia files fail to load when placed directly in the GameData root folder #407

Description

@tinygrox

What did you do before the bug occurred?

What happened?

My KSPedia was completely ignored and failed to load in-game.

However, if the exact same file is moved into any subfolder (e.g. GameData/MyMod ), it loads without any issues.
It appears the loader is only scanning subdirectories and skipping loose files at the top level of GameData.

Upload your ksp.log file

This bug doesn't generate any errors or exceptions—the file is just silently skipped.

I suspect this happens because the loader in

var files = Enumerable.Repeat(coreDir, 1)
.Concat(
assetDir
.EnumerateDirectories()
.Where(dir => dir.Name != loader.coreDirectory)
)
.AsParallel()
.AsOrdered()
.SelectMany(dir => dir.GetFiles(glob, SearchOption.AllDirectories))
.Where(file => !assetBlacklist.Contains(file.Name))
.AsSequential();

might only be enumerating subdirectories, which unintentionally skips loose files located at the top-level directory.

A screenshot of the problem

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions