From: Tim Clem <tclem@codeweavers.com> The CFURLCopyResourcePropertyForKey fails silently and returns 0 free bytes if the volume is not APFS. --- dlls/ntdll/unix/file.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c index d413bbbc0ab..a215f72a55d 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c @@ -2190,6 +2190,13 @@ static LONGLONG get_free_bytes_for_important_data(int fd) if (!(url = CFURLCreateFromFileSystemRepresentation( NULL, (UInt8 *)path, strlen(path), false ))) goto done; if (!CFURLCopyResourcePropertyForKey( url, kCFURLVolumeAvailableCapacityForImportantUsageKey, &num, NULL )) goto done; CFNumberGetValue( num, kCFNumberLongLongType, &space ); + if (space == 0) + { + /* It's unlikely that a writeable disk has exactly 0 free bytes. This + * probably means the disk is read-only, or is not APFS. Fall back to + * statfs. */ + space = -1; + } done: free( path ); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10625