mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-22 14:57:02 +01:00
scd: call update_card_removed only when detecting removal.
* scd/command.c (update_reader_status_file): Add condition ss->status == 0. -- To reproduce the bug: (1) insert card, (2) run "gpg2 --card-status", (3) remove card, (4) invoke "gpg2 --card-edit", (5) invoke some command like "verify" The last step fails (but with no error message to user).
This commit is contained in:
parent
ae22d629b6
commit
ed0328d49a
@ -2310,10 +2310,8 @@ update_reader_status_file (int set_card_removed_flag)
|
||||
xfree (homestr);
|
||||
}
|
||||
|
||||
/* Set the card removed flag for all current sessions. We
|
||||
will set this on any card change because a reset or
|
||||
SERIALNO request must be done in any case. */
|
||||
if (ss->any && set_card_removed_flag)
|
||||
/* Set the card removed flag for all current sessions. */
|
||||
if (ss->any && ss->status == 0 && set_card_removed_flag)
|
||||
update_card_removed (idx, 1);
|
||||
|
||||
ss->any = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user