Changeset 71992 in vbox
- Timestamp:
- Apr 24, 2018 7:26:23 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/MachineImplMoveVM.cpp
r71990 r71992 889 889 { 890 890 /* 891 * Fix the progress count 892 * In instance, the whole "move vm" operation is failed on 9th step. But total count is 20.891 * Fix the progress counter 892 * In instance, the whole "move vm" operation is failed on 5th step. But total count is 20. 893 893 * Where 20 = 2 * 10 operations, where 10 is the real number of operations. And this value was doubled 894 894 * earlier in the init() exactly for one reason - rollback operation. Because in this case we must do 895 895 * the same operations but in backward direction. 896 * Thus now we want to correct progress operation count from 9 to 11. Why? 897 * Because we should have evaluated count as "20/2 + (20/2 - 9)" = 11 or just "20 - 9" = 11 896 * Thus now we want to correct the progress counter from 5 to 15. Why? 897 * Because we should have evaluated the counter as "20/2 + (20/2 - 5)" = 15 or just "20 - 5" = 15 898 * And because the 5th step failed it shouldn't be counted. 899 * As result, we need to rollback 4 operations. 900 * Thus we start from "operation + 1" and finish when "i < operationCount - operation". 898 901 */ 899 for (ULONG i = operation ; i < operationCount - operation; ++i)902 for (ULONG i = operation + 1; i < operationCount - operation; ++i) 900 903 { 901 904 rc = taskMoveVM->m_pProgress->SetNextOperation(BstrFmt("Skip the empty operation %d...", i + 1).raw(), 1); … … 947 950 /* Restore an original path to XML setting file */ 948 951 { 949 LogRelFunc(("Rollback scenario: Restore anoriginal path to XML setting file\n"));952 LogRelFunc(("Rollback scenario: restoration of the original path to XML setting file\n")); 950 953 Utf8Str strOriginalSettingsFilePath = taskMoveVM->vmFolders[VBox_SettingFolder]; 951 954 strOriginalSettingsFilePath.append(RTPATH_DELIMITER).append(Utf8Str(bstrMachineName)).append(".vbox");
Note:
See TracChangeset
for help on using the changeset viewer.