Git Product home page Git Product logo

Comments (4)

dukechem avatar dukechem commented on August 28, 2024

First thanks for all the work, and I apologize that this issue somehow got submitted as #21 -#37. I closed 21-36 leaving this one as #37.

In 3 all versions I tested: 0.7a, 0.8a, and newest 0.9a, for KB4471324 wumgr says obviously way too big size of 86.90 GB. Googling " KB4471324 size" says actual size should be around 799.0 MB.

I am guessing issue is in code snippet below from FileOps.cs
`
class FileOps

12 | {
13 | static public string FormatSize(decimal size)
14 | {
15 | if (size == 0)
16 | return "";
17 | if (size > 1024 * 1024 * 1024)
18 | return (size / (1024 * 1024 * 1024)).ToString("F") + " GB
`
My guess is that above code may need tweaking to use examples here:
https://stackoverflow.com/questions/281640/how-do-i-get-a-human-readable-file-size-in-bytes-abbreviation-using-net

Sorry I don't have time to fork and try to fix right now. Thanks again for all the work!

from wumgr.

Gurthurb avatar Gurthurb commented on August 28, 2024

The FormatSize method in FileOps.cs is slightly incorrect; its size checks should use >= and not >, because otherwise e.g. 1024*1024 will return 1024,00 KB instead of 1,00 MB.

But that can't be the reason for the KB4471324 size issue - I'm guessing it's caused by the Windows Update servers reporting an incorrect size?

from wumgr.

demovirus avatar demovirus commented on August 28, 2024

I have been facing this bug for a long time in WUMT. So it's likely connected with Microsoft update service.

from wumgr.

DavidXanatos avatar DavidXanatos commented on August 28, 2024

the >= will be fixed in the next build.

about the totaly wrong size, yes its what windows reports no way to fix that imho

from wumgr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.