- Timestamp:
- Jan 2, 2018 11:19:34 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/nt/RTPathQueryInfo-nt.cpp
r70195 r70420 413 413 if (RT_SUCCESS(rc)) 414 414 return rc; 415 rc = RTErrConvertFromNtStatus(rcNt);416 415 } 417 416 else if ( rcNt != STATUS_ACCESS_DENIED … … 430 429 if (rc == VINF_TRY_AGAIN) 431 430 { 431 static int volatile g_fReparsePoints = -1; 432 uint32_t fOptions = FILE_OPEN_FOR_BACKUP_INTENT | FILE_SYNCHRONOUS_IO_NONALERT; 433 int fReparsePoints = g_fReparsePoints; 434 if (fReparsePoints != 0 && !(fFlags & RTPATH_F_FOLLOW_LINK)) 435 fOptions |= FILE_OPEN_REPARSE_POINT; 436 432 437 InitializeObjectAttributes(&ObjAttr, pNtName, OBJ_CASE_INSENSITIVE, hRootDir, NULL); 433 438 rcNt = NtCreateFile(&hFile, … … 439 444 FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, 440 445 FILE_OPEN, 441 FILE_OPEN_FOR_BACKUP_INTENT | FILE_SYNCHRONOUS_IO_NONALERT 442 | (fFlags & RTPATH_F_FOLLOW_LINK ? 0 : FILE_OPEN_REPARSE_POINT), 446 fOptions, 443 447 NULL /*pvEaBuffer*/, 444 448 0 /*cbEa*/); 449 if ( ( rcNt == STATUS_INVALID_PARAMETER 450 || rcNt == STATUS_INVALID_PARAMETER_9) 451 && fReparsePoints == -1 452 && (fOptions & FILE_OPEN_REPARSE_POINT)) 453 { 454 fOptions &= ~FILE_OPEN_REPARSE_POINT; 455 rcNt = NtCreateFile(&hFile, 456 FILE_READ_ATTRIBUTES | SYNCHRONIZE, 457 &ObjAttr, 458 &Ios, 459 NULL /*pcbFile*/, 460 FILE_ATTRIBUTE_NORMAL, 461 FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, 462 FILE_OPEN, 463 fOptions, 464 NULL /*pvEaBuffer*/, 465 0 /*cbEa*/); 466 if (rcNt != STATUS_INVALID_PARAMETER) 467 g_fReparsePoints = fReparsePoints = 0; 468 } 445 469 if (NT_SUCCESS(rcNt)) 446 470 { … … 489 513 rc = VERR_TRY_AGAIN; 490 514 } 515 else if ( rcNt == STATUS_OBJECT_TYPE_MISMATCH 516 || rcNt == STATUS_OBJECT_NAME_INVALID 517 /*|| rcNt == STATUS_INVALID_PARAMETER*/) 518 { 519 rc = rtPathNtQueryInfoInDirectoryObject(&ObjAttr, pObjInfo, enmAddAttr, fFlags, &uBuf, sizeof(uBuf)); 520 if (RT_SUCCESS(rc)) 521 return rc; 522 } 491 523 else if ( rcNt != STATUS_ACCESS_DENIED 492 524 && rcNt != STATUS_SHARING_VIOLATION)
Note:
See TracChangeset
for help on using the changeset viewer.