Changeset 81361 in vbox
- Timestamp:
- Oct 18, 2019 5:22:44 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/MachineImplMoveVM.cpp
r80585 r81361 170 170 uint32_t cbSector = 0; 171 171 172 172 173 int vrc = RTFsQuerySizes(strTargetFolder.c_str(), &cbTotal, &cbFree, &cbBlock, &cbSector); 173 174 if (FAILED(vrc)) … … 249 250 strLogFolder = bstr_logFolder; 250 251 if ( m_type.equals("basic") 251 && strLogFolder.contains(strSettingsFilePath))252 && RTPathStartsWith(strLogFolder.c_str(), strSettingsFilePath.c_str())) 252 253 m_vmFolders.insert(std::make_pair(VBox_LogFolder, strLogFolder)); 253 254 … … 265 266 strStateFilePath.stripFilename(); 266 267 if ( m_type.equals("basic") 267 && strStateFilePath.contains(strSettingsFilePath))268 && RTPathStartsWith(strStateFilePath.c_str(), strSettingsFilePath.c_str())) 268 269 m_vmFolders.insert(std::make_pair(VBox_StateFolder, strStateFilePath)); 269 270 } … … 277 278 strSnapshotFolder = bstr_snapshotFolder; 278 279 if ( m_type.equals("basic") 279 && strSnapshotFolder.contains(strSettingsFilePath))280 && RTPathStartsWith(strSnapshotFolder.c_str(), strSettingsFilePath.c_str())) 280 281 m_vmFolders.insert(std::make_pair(VBox_SnapshotFolder, strSnapshotFolder)); 281 282 … … 391 392 Utf8Str name = sst.strSaveStateFile; 392 393 /*if a state file is located in the actual VM folder it will be added to the actual list */ 393 if ( name.contains(strSettingsFilePath))394 if (RTPathStartsWith(name.c_str(), strSettingsFilePath.c_str())) 394 395 { 395 396 vrc = RTFileQuerySizeByPath(name.c_str(), &cbFile); … … 1184 1185 * Maybe the more clever check is needed in the some corner cases. 1185 1186 */ 1186 if (! path.contains(targetPath))1187 if (!RTPathStartsWith(path.c_str(), targetPath.c_str())) 1187 1188 m_pMachine->mSSData->strStateFilePath = Utf8StrFmt("%s%s", 1188 1189 targetPath.c_str(), … … 1433 1434 mt.strBaseName = bstrLocation; 1434 1435 Utf8Str const &strFolder = m_vmFolders[VBox_SnapshotFolder]; 1435 if (strFolder.isNotEmpty() && mt.strBaseName.contains(strFolder)) /** @todo r=bird: contains? Shouldn't it be startsWith and take mixed slashes (windows) and stuff into account? */ 1436 1437 if (strFolder.isNotEmpty() && RTPathStartsWith(mt.strBaseName.c_str(), strFolder.c_str())) 1436 1438 mt.fSnapshot = true; 1437 1439 else
Note:
See TracChangeset
for help on using the changeset viewer.