mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Don't show Windows error dialog when cannot retrieve drive free space.
This commit is contained in:
parent
8fde6e2098
commit
a8e2f4e2aa
1 changed files with 3 additions and 0 deletions
|
|
@ -589,9 +589,12 @@ end;
|
|||
{$ELSE}
|
||||
var
|
||||
wPath: WideString;
|
||||
OldErrorMode: Word;
|
||||
begin
|
||||
wPath:= UTF8Decode(Path);
|
||||
OldErrorMode:= SetErrorMode(SEM_FAILCRITICALERRORS or SEM_NOOPENFILEERRORBOX);
|
||||
Result:= GetDiskFreeSpaceExW(PWChar(wPath), FreeSize, TotalSize, nil);
|
||||
SetErrorMode(OldErrorMode);
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue