You are not logged in.
Pages: 1
Hi Arnaud,
Just letting you know of a potential bug in GetDiskPartitionsText (SynTable.pas)
The windows version seems to be ignoring the "withfreespace" parameter...
function GetInfo(var p: TDiskPartition): shortstring;
var av, fr, tot: QWord;
begin
if not withfreespace or not GetDiskInfo(p.mounted,av,fr,tot) then
{$ifdef MSWINDOWS}
FormatShort('%: % (%)',[p.mounted[1],p.name,KB(p.size,nospace)],result) else
FormatShort(F[nospace],[p.mounted[1],p.name,KB(p.size,nospace)],result); <===== doesn't include disk free space values
{$else}
FormatShort('% % (%)',[p.mounted,p.name,KB(p.size,nospace)],result) else
FormatShort(F[nospace],[p.mounted,p.name,KB(fr,nospace),KB(tot,nospace)],result);
{$endif}
end;
I tried changing the MSWINDOWS version to be the same as non-windows ...
FormatShort(F[nospace],[p.mounted,p.name,KB(fr,nospace),KB(tot,nospace)],result);
and all seems to work OK
Offline
Please try https://synopse.info/fossil/info/dc2ac37a4e
Thanks for the feedback!
Online
Pages: 1