cpp: Handle canceling of an edit operation
* lang/cpp/src/editinteractor.cpp (CallbackHelper::edit_interactor_callback_impl): Check for error _or_ canceled state. -- Without this canceling an edit operation resulted in a "General error". GnuPG-bug-id: 5904
This commit is contained in:
parent
db532eca8e
commit
28cdbfdccb
@ -101,7 +101,7 @@ public:
|
||||
std::fprintf(ei->debug, "EditInteractor: %u -> nextState( %s, %s ) -> %u\n",
|
||||
oldState, status_to_string(status), args ? args : "<null>", ei->state);
|
||||
}
|
||||
if (err) {
|
||||
if (err || err.isCanceled()) {
|
||||
ei->state = oldState;
|
||||
goto error;
|
||||
}
|
||||
@ -154,7 +154,7 @@ public:
|
||||
}
|
||||
|
||||
error:
|
||||
if (err) {
|
||||
if (err || err.isCanceled()) {
|
||||
ei->error = err;
|
||||
ei->state = EditInteractor::ErrorState;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user