Skip to content

manager.py: Fix unchanged field being corrupted with file size bytes#49

Open
MateoGonzalezLourido wants to merge 2 commits into
Heroic-Games-Launcher:masterfrom
MateoGonzalezLourido:fix-conteo-archivos
Open

manager.py: Fix unchanged field being corrupted with file size bytes#49
MateoGonzalezLourido wants to merge 2 commits into
Heroic-Games-Launcher:masterfrom
MateoGonzalezLourido:fix-conteo-archivos

Conversation

@MateoGonzalezLourido

Copy link
Copy Markdown

AnalysisResult defines two separate fields:

unchanged: int — count of unchanged files
unchanged_size: int — total size in bytes of unchanged files

In manager.py, line 254 was writing file sizes into unchanged instead of unchanged_size:
python# Before (incorrect)
analysis_res.unchanged += fm.file_size # mixes byte values into a file count

After

analysis_res.unchanged_size += fm.file_size
This meant any code reading analysis_res.unchanged would get a completely corrupt value (file count + accumulated bytes), and unchanged_size was always left at 0 despite being declared in the dataclass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant