mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-08-28 17:42:28 +08:00
libobs: Use 'important' usage key for macOS disk space calculations
This commit is contained in:
@@ -370,11 +370,11 @@ int64_t os_get_free_space(const char *path)
|
||||
|
||||
NSDictionary *values = [fileURL resourceValuesForKeys:availableCapacityKeys error:nil];
|
||||
|
||||
NSNumber *availableOpportunisticSpace = values[NSURLVolumeAvailableCapacityForOpportunisticUsageKey];
|
||||
NSNumber *availableImportantSpace = values[NSURLVolumeAvailableCapacityForImportantUsageKey];
|
||||
NSNumber *availableSpace = values[NSURLVolumeAvailableCapacityKey];
|
||||
|
||||
if (availableOpportunisticSpace.longValue > 0) {
|
||||
return availableOpportunisticSpace.longValue;
|
||||
if (availableImportantSpace.longValue > 0) {
|
||||
return availableImportantSpace.longValue;
|
||||
} else {
|
||||
return availableSpace.longValue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user