Changeset 9927 in vbox
- Timestamp:
- Jun 25, 2008 3:03:04 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedFolders/vbsf.cpp
r9880 r9927 236 236 { 237 237 #ifdef RT_OS_DARWIN 238 /** @todo This belongs in rtPathToNative or in the windows shared folder file system driver... 239 * The question is simply whether the NFD normalization is actually applied on a (virtaul) file 240 * system level in darwin, or just by the user mode application libs. */ 238 241 SHFLSTRING *pPathParameter = pPath; 239 242 size_t cbPathLength; … … 241 244 uint16_t ucs2Length; 242 245 CFRange rangeCharacters; 243 246 244 247 // Is 8 times length enough for decomposed in worst case...? 245 248 cbPathLength = sizeof(SHFLSTRING) + pPathParameter->u16Length * 8 + 2; … … 251 254 return rc; 252 255 } 253 256 254 257 ::CFStringAppendCharacters(inStr, (UniChar*)pPathParameter->String.ucs2, pPathParameter->u16Length / sizeof(pPathParameter->String.ucs2[0])); 255 258 ::CFStringNormalize(inStr, kCFStringNormalizationFormD); 256 259 ucs2Length = ::CFStringGetLength(inStr); 257 260 258 261 rangeCharacters.location = 0; 259 262 rangeCharacters.length = ucs2Length; … … 262 265 pPath->u16Length = ucs2Length * sizeof(pPath->String.ucs2[0]); 263 266 pPath->u16Size = pPath->u16Length + sizeof(pPath->String.ucs2[0]); 264 267 265 268 CFRelease(inStr); 266 269 #endif … … 1387 1390 1388 1391 #ifdef RT_OS_DARWIN 1392 /** @todo This belongs in rtPathToNative or in the windows shared folder file system driver... 1393 * The question is simply whether the NFD normalization is actually applied on a (virtaul) file 1394 * system level in darwin, or just by the user mode application libs. */ 1389 1395 { 1390 1396 // Convert to … … 1395 1401 CFRange rangeCharacters; 1396 1402 CFMutableStringRef inStr = ::CFStringCreateMutable(NULL, 0); 1397 1403 1398 1404 ::CFStringAppendCharacters(inStr, (UniChar *)pwszString, RTUtf16Len (pwszString)); 1399 1405 ::CFStringNormalize(inStr, kCFStringNormalizationFormC); 1400 1406 ucs2Length = ::CFStringGetLength(inStr); 1401 1407 1402 1408 rangeCharacters.location = 0; 1403 1409 rangeCharacters.length = ucs2Length; 1404 1410 ::CFStringGetCharacters(inStr, rangeCharacters, pwszString); 1405 1411 pwszString[ucs2Length] = 0x0000; // NULL terminated 1406 1412 1407 1413 CFRelease(inStr); 1408 1414 } … … 1435 1441 } 1436 1442 Assert(rc != VINF_SUCCESS || *pcbBuffer > 0); 1437 1443 1438 1444 end: 1439 1445 if (pDirEntry)
Note:
See TracChangeset
for help on using the changeset viewer.