Changeset 85163 in vbox
- Timestamp:
- Jul 10, 2020 9:53:41 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/darwin/RTPathUserDocuments-darwin.cpp
r82968 r85163 36 36 #include <iprt/err.h> 37 37 38 #include <NSSystemDirectories.h> 38 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 101200 39 # include <sysdir.h> 40 #else 41 # include <NSSystemDirectories.h> 42 #endif 39 43 #include <sys/syslimits.h> 40 44 #ifdef IPRT_USE_CORE_SERVICE_FOR_USER_DOCUMENTS … … 53 57 /* 54 58 * Try NSSystemDirectories first since that works for directories that doesn't exist. 59 * The NSSystemDirectories API was renamed in 10.12 to sysdir. 55 60 */ 56 61 int rc = VERR_PATH_NOT_FOUND; 62 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 101200 63 sysdir_search_path_enumeration_state EnmState = sysdir_start_search_path_enumeration(SYSDIR_DIRECTORY_DOCUMENT, 64 SYSDIR_DOMAIN_MASK_USER); 65 #else 57 66 NSSearchPathEnumerationState EnmState = NSStartSearchPathEnumeration(NSDocumentDirectory, NSUserDomainMask); 67 #endif 58 68 if (EnmState != 0) 59 69 { 60 70 char szTmp[PATH_MAX]; 61 71 szTmp[0] = szTmp[PATH_MAX - 1] = '\0'; 72 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 101200 73 EnmState = sysdir_get_next_search_path_enumeration(EnmState, szTmp); 74 #else 62 75 EnmState = NSGetNextSearchPathEnumeration(EnmState, szTmp); 76 #endif 63 77 if (EnmState != 0) 64 78 {
Note:
See TracChangeset
for help on using the changeset viewer.