~ubuntu-branches/ubuntu/vivid/gnupg2/vivid

« back to all changes in this revision

Viewing changes to g10/openfile.c

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2014-10-30 15:32:48 UTC
  • mfrom: (14.1.17 sid)
  • Revision ID: package-import@ubuntu.com-20141030153248-yzgwg8613ms7hrrz
Tags: 2.0.26-3ubuntu1
* Merge from Debian, remaining changes:
  - Drop sh prefix from openpgp test environment as it leads to exec
    invocations of sh /bin/bash leading to syntax errors from sh.  Fixes
    FTBFS detected in Ubuntu saucy archive rebuild.
  - Add udev rules to give gpg access to some smartcard readers;
    Debian #543217.
  - debian/gnupg2.udev: udev rules to set ACLs on SCM smartcard readers.
  - Add upstart user job for gpg-agent.
  - debian/control: drop dirmngr to Suggests as it is in universe.

Show diffs side-by-side

added added

removed removed

Lines of Context:
144
144
 
145
145
  if ( opt.batch )
146
146
    return NULL;
147
 
  
 
147
 
148
148
  defname = name && namelen? make_printable_string (name, namelen, 0) : NULL;
149
149
 
150
150
  s = _("Enter new filename");
159
159
  cpr_kill_prompt ();
160
160
  tty_disable_completion ();
161
161
  xfree (prompt);
162
 
  if ( !*fname ) 
 
162
  if ( !*fname )
163
163
    {
164
 
      xfree (fname); 
 
164
      xfree (fname);
165
165
      fname = defname;
166
166
      defname = NULL;
167
167
    }
197
197
  else {
198
198
    char *buf = NULL;
199
199
    const char *name;
200
 
    
 
200
 
201
201
    if ( opt.dry_run )
202
202
      {
203
203
#ifdef HAVE_W32_SYSTEM
222
222
          char *dot;
223
223
          const char *newsfx = mode==1 ? ".asc" :
224
224
                               mode==2 ? ".sig" : ".gpg";
225
 
          
 
225
 
226
226
          buf = xmalloc(strlen(iname)+4+1);
227
227
          strcpy(buf,iname);
228
228
          dot = strchr(buf, '.' );
259
259
        xfree (buf);
260
260
        name = buf = tmp;
261
261
      }
262
 
    
 
262
 
263
263
    if( !rc )
264
264
      {
265
265
        if (is_secured_filename (name) )
385
385
                    ;
386
386
                else if (c == '#')
387
387
                    esc = 2;
388
 
                else 
 
388
                else
389
389
                    any_option = 1;
390
390
            }
391
391
        }
431
431
      else if (!opt.quiet )
432
432
        log_info ( _("directory `%s' created\n"), fname );
433
433
      copy_options_file( fname );
434
 
      
 
434
 
435
435
    }
436
436
}