From: Tim Clem <tclem@codeweavers.com> The CFURLCopyResourcePropertyForKey fails silently and returns 0 free bytes if the volume is not APFS. --- dlls/mountmgr.sys/unixlib.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dlls/mountmgr.sys/unixlib.c b/dlls/mountmgr.sys/unixlib.c index 2a5fd272db6..575a26e9a1c 100644 --- a/dlls/mountmgr.sys/unixlib.c +++ b/dlls/mountmgr.sys/unixlib.c @@ -328,6 +328,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