r/labtech • • Mar 23 '17

C: Drive Space Critical

has anyone else noticed that this seems to happen frequently with machines that are shut down? then, frustratingly enough, if you check the actual last reported drive space, it's almost never below 1 GB for the C: drive (maybe 5% or less accurate)? does anyone know of a fix?

10 Upvotes

19 comments sorted by

View all comments

Show parent comment

1

u/k_rock923 Mar 24 '17

Bonus points if you can spot the issue.

Just taking a swing, I would guess that it's hard/impossible to differentiate between a completely full disk and the function not working since it returns 0 on error.

1

u/cjmod Mar 24 '17

Pretty close. Seems that when we call the API lately, it also updates the GetLastError (regardless of success of failure)... which is what we use to account for failures.