Skip to content

download_logic.rs: conditionally call set_file_permissions only for written files #113

Description

@BillyOutlast

Problem

In desktop/src-tauri/games/src/downloads/download_logic.rs:141-183, set_file_permissions is called unconditionally in the file-processing loop. When should_write is false and no file is opened/written, permission updates should be skipped.

Proposed Fix

Guard set_file_permissions behind a check that should_write is true and the file was actually opened/written. Preserve permission updates for written files while skipping them for files handled only by stream consumption.

Priority

Low — minor inefficiency; no functional impact.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdesktopgood first issueGood for newcomersrustPull requests that update rust code

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions