agent: Flush before calling ftruncate.
* agent/findkey.c (write_extended_private_key): Make sure it is flushed out.
Cherry-picked from master commit of:
99d2931887e5ba0db9007024b3420b110603d5be
- GnuPG-bug-id: T6035
- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>