mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
Allow to enter an alternate filename
This commit is contained in:
parent
ec742b7f58
commit
424f5d6d93
8 changed files with 55 additions and 29 deletions
|
@ -89,9 +89,17 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
|
|||
setmode ( fileno(fp) , O_BINARY );
|
||||
#endif
|
||||
}
|
||||
else if( !overwrite_filep( fname ) ) {
|
||||
rc = G10ERR_CREATE_FILE;
|
||||
goto leave;
|
||||
else {
|
||||
while( !overwrite_filep (fname) ) {
|
||||
char *tmp = ask_outfile_name (NULL, 0);
|
||||
if ( !tmp || !*tmp ) {
|
||||
m_free (tmp);
|
||||
rc = G10ERR_CREATE_FILE;
|
||||
goto leave;
|
||||
}
|
||||
m_free (fname);
|
||||
fname = tmp;
|
||||
}
|
||||
}
|
||||
|
||||
if( fp || nooutput )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue