aboutsummaryrefslogtreecommitdiffstats
path: root/lang/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lang/cpp')
-rw-r--r--lang/cpp/src/editinteractor.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/lang/cpp/src/editinteractor.cpp b/lang/cpp/src/editinteractor.cpp
index 84ddf398..5f9236cb 100644
--- a/lang/cpp/src/editinteractor.cpp
+++ b/lang/cpp/src/editinteractor.cpp
@@ -167,6 +167,20 @@ public:
}
error:
+ if (err.code() == GPG_ERR_GENERAL) {
+ // gpg may have asked an unknown question; try to use the default answer
+ if (ei->debug) {
+ std::fprintf(ei->debug, "EditInteractor: action result \"%s\" (go with the default answer)\n", "");
+ }
+ if (writeAll(fd, "\n", 1) != 1) {
+ err = Error::fromSystemError();
+ if (ei->debug) {
+ std::fprintf(ei->debug, "EditInteractor: Could not write to fd %d (%s)\n", fd, err.asStdString().c_str());
+ }
+ } else {
+ err = Error();
+ }
+ }
if (err || err.isCanceled()) {
ei->error = err;
ei->state = EditInteractor::ErrorState;