mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Don't use pre-allocation of disk space on the FAT32 under Linux (fixes #1739)
(cherry picked from commit c4ae646f00)
This commit is contained in:
parent
7d895fb6aa
commit
dfe6006ec8
1 changed files with 7 additions and 0 deletions
|
|
@ -1444,9 +1444,16 @@ function FileAllocate(Handle: System.THandle; Size: Int64): Boolean;
|
|||
var
|
||||
Ret: cint;
|
||||
Sta: TStat;
|
||||
StaFS: TStatFS;
|
||||
begin
|
||||
if (Size > 0) then
|
||||
begin
|
||||
repeat
|
||||
Ret:= fpfStatFS(Handle, @StaFS);
|
||||
until (Ret <> -1) or (fpgeterrno <> ESysEINTR);
|
||||
// FAT32 does not support a fast allocation
|
||||
if (StaFS.fstype = MSDOS_SUPER_MAGIC) then
|
||||
Exit(False);
|
||||
repeat
|
||||
Ret:= fpFStat(Handle, Sta);
|
||||
until (Ret <> -1) or (fpgeterrno <> ESysEINTR);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue