Skip to content

download_agent.rs: normalize filename separators in cleanup_filetree #110

Description

@BillyOutlast

Problem

cleanup_filetree in desktop/src-tauri/games/src/downloads/download_agent.rs:323-354 strips a base path prefix and converts to string via to_string_lossy().to_string(). On Windows, this can produce \ separators while manifest keys use /, causing file_list.contains_key to miss matches.

Proposed Fix

Normalize the relative filename to use / separators after to_string_lossy() before checking file_list.contains_key. Add .replace('\\', '/') or use a path normalization function.

Priority

Low — Windows-only edge case. Desktop app primarily targets Linux/macOS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomersrustPull requests that update rust codewindows

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions