Freaky / Compactor

A user interface for Windows 10 filesystem compression
MIT License
1.16k stars 47 forks source link

Negative space saved on initial analysis #1

Closed Freaky closed 5 years ago

Freaky commented 5 years ago

Noticed a few folder scans on two different machines that reported small (few hundred KiB) negative amounts of space saved. Seems to only happen on an initial scan - a re-scan immediately afterwards usually doesn't see the same thing.

Freaky commented 5 years ago

Hypothesis: files growing between the directory walk metadata read and the GetCompressedFileSizeW call.

Supporting evidence: first noticed when walking an uncompressed C:\ProgramData, which I assume changes a fair bit. Second noticed when walking an uncompressed Steam install that hadn't been updated for ages while Steam was running.

UI display could be fixed by only taking the compressed sizes into account - as it is it just takes the global logical - physical size to compute the space saved.