Changeset 107377 in vbox
- Timestamp:
- Dec 19, 2024 9:28:00 AM (4 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/nt/RTFileDelete-r3-nt.cpp
r107346 r107377 149 149 * grok the reparse point stuff. 150 150 */ 151 else if ( rcNt == STATUS_INVALID_PARAMETER)151 else if ( rcNt == STATUS_INVALID_PARAMETER) 152 152 { 153 153 fOpenOptions &= ~FILE_OPEN_REPARSE_POINT; … … 166 166 0 /*EaLength*/); 167 167 } 168 /* 169 * When getting STATUS_OBJECT_PATH_NOT_FOUND we re-initialize the object attributes 170 * with OBJ_CASE_INSENSITIVE and try again. This is necessary for older object managers (i.e. on NT4) 171 * when trying to delete files with a path *and* leading spaces in the file name, 172 * i.e. "c:\temp\ file_with_a_leading_space". 173 * 174 * See @bugref{10826}. 175 */ 176 else if ( rcNt == STATUS_OBJECT_PATH_NOT_FOUND) 177 { 178 InitializeObjectAttributes(&ObjAttr, &NtName, OBJ_CASE_INSENSITIVE /*fAttrib*/, hRootDir, NULL); 179 180 hPath = RTNT_INVALID_HANDLE_VALUE; 181 RTNT_IO_STATUS_BLOCK_REINIT(&Ios); 182 rcNt = NtCreateFile(&hPath, 183 DELETE | FILE_READ_ATTRIBUTES | SYNCHRONIZE, 184 &ObjAttr, 185 &Ios, 186 NULL /*AllocationSize*/, 187 FILE_ATTRIBUTE_NORMAL, 188 FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE, 189 FILE_OPEN, 190 fOpenOptions, 191 NULL /*EaBuffer*/, 192 0 /*EaLength*/); 193 } 194 168 195 /* else: 169 196 DeleteFileW will retry opening the file w/o FILE_READ_ATTRIBUTES here when … … 210 237 if (!NT_SUCCESS(rcNt) && RT_SUCCESS_NP(rc)) 211 238 rc = RTErrConvertFromNtStatus(rcNt); 212 239 } 213 240 else if (RT_SUCCESS_NP(rc)) 214 241 rc = RTErrConvertFromNtStatus(rcNt);
Note:
See TracChangeset
for help on using the changeset viewer.