diff options
-rw-r--r-- | doc/operations.qdoc | 3 | ||||
-rw-r--r-- | src/libs/installer/createlocalrepositoryoperation.cpp | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/doc/operations.qdoc b/doc/operations.qdoc index 1df1de39d..a01446a69 100644 --- a/doc/operations.qdoc +++ b/doc/operations.qdoc @@ -252,6 +252,9 @@ \li Creates a local repository in the directory specified by \c repoPath. For offline installers, stores binary data in the directory specified by \c binaryPath. + \note The repository will be deleted during uninstallation. If you want keep + the repository, you can overwrite the \e UNDO by passing \e UNDOOPERATION + and \e "", to the end of the argument list. \row \li FakeStopProcessForUpdate \li "FakeStopProcessForUpdate" \c processlist diff --git a/src/libs/installer/createlocalrepositoryoperation.cpp b/src/libs/installer/createlocalrepositoryoperation.cpp index 1d194e5b3..e05c34b91 100644 --- a/src/libs/installer/createlocalrepositoryoperation.cpp +++ b/src/libs/installer/createlocalrepositoryoperation.cpp @@ -374,7 +374,11 @@ bool CreateLocalRepositoryOperation::performOperation() bool CreateLocalRepositoryOperation::undoOperation() { - Q_ASSERT(arguments().count() == 2); + if (parseUndoOperationArguments().count() > 0) + return true; + + if (!checkArgumentCount(2)) + return false; AutoHelper _(this); emit progressChanged(0.0); |