Changeset 23973 in vbox for trunk/src/VBox/Runtime/r3/xml.cpp
- Timestamp:
- Oct 22, 2009 12:34:22 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 53801
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/xml.cpp
r23903 r23973 181 181 m->strFileName = aFileName; 182 182 183 u nsignedflags = 0;183 uint32_t flags = 0; 184 184 switch (aMode) 185 185 { 186 /** @todo change to RTFILE_O_DENY_WRITE where appropriate. */ 186 187 case Mode_Read: 187 flags = RTFILE_O_READ ;188 flags = RTFILE_O_READ | RTFILE_O_OPEN | RTFILE_O_DENY_NONE; 188 189 break; 189 190 case Mode_WriteCreate: // fail if file exists 190 flags = RTFILE_O_WRITE | RTFILE_O_CREATE;191 flags = RTFILE_O_WRITE | RTFILE_O_CREATE | RTFILE_O_DENY_NONE; 191 192 break; 192 193 case Mode_Overwrite: // overwrite if file exists 193 flags = RTFILE_O_WRITE | RTFILE_O_CREATE_REPLACE;194 flags = RTFILE_O_WRITE | RTFILE_O_CREATE_REPLACE | RTFILE_O_DENY_NONE; 194 195 break; 195 196 case Mode_ReadWrite: 196 flags = RTFILE_O_READ | RTFILE_O_WRITE;197 } 198 199 int vrc = RTFileOpen 200 if (RT_FAILURE 201 throw EIPRTFailure 197 flags = RTFILE_O_READWRITE | RTFILE_O_OPEN | RTFILE_O_DENY_NONE;; 198 } 199 200 int vrc = RTFileOpen(&m->handle, aFileName, flags); 201 if (RT_FAILURE(vrc)) 202 throw EIPRTFailure(vrc); 202 203 203 204 m->opened = true;
Note:
See TracChangeset
for help on using the changeset viewer.