/[winpt]/trunk/Src/wptFileManager.cpp
ViewVC logotype

Diff of /trunk/Src/wptFileManager.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 211 by twoaday, Sun May 7 12:36:48 2006 UTC revision 214 by twoaday, Sun May 14 18:40:36 2006 UTC
# Line 606  fm_add_opened_files (listview_ctrl_t lv, Line 606  fm_add_opened_files (listview_ctrl_t lv,
606    
607    
608  int  int
609  fm_assume_onepass_sig (const char * fname)  fm_assume_onepass_sig (const char *fname)
610  {      {    
611      armor_filter_context_t afx;      armor_filter_context_t afx;
612      gpg_iobuf_t fp;      gpg_iobuf_t fp;
# Line 1276  restore_original_name (const char *outpu Line 1276  restore_original_name (const char *outpu
1276          memcpy (orig, output, (dir-output)+1);          memcpy (orig, output, (dir-output)+1);
1277          strcat (orig, file_name);          strcat (orig, file_name);
1278      }      }
1279        /* XXX: we need to find out if the string needs to be utf8 decoded. */
1280      if (overwrite_file (orig)) {      if (overwrite_file (orig)) {
1281          DeleteFile (orig);          DeleteFile (orig);
1282          if (!MoveFile (output, orig))          if (!MoveFile (output, orig))
# Line 1322  fm_decrypt (fm_state_t c, const char *na Line 1323  fm_decrypt (fm_state_t c, const char *na
1323              goto leave;              goto leave;
1324      }      }
1325    
1326        /* we fetch all recipients here to make sure they list is complete. */
1327        release_gpg_recipients (&c->pass_cb.recipients);
1328        gpg_get_recipients (name, &c->pass_cb.recipients);
1329    
1330      err = gpg_file_data_new (name, F_DATA_READ, &in);      err = gpg_file_data_new (name, F_DATA_READ, &in);
1331      if (err)      if (err)
1332          goto leave;          goto leave;
# Line 1329  fm_decrypt (fm_state_t c, const char *na Line 1334  fm_decrypt (fm_state_t c, const char *na
1334      err = gpg_file_data_new (c->output, F_DATA_WRITE, &out);      err = gpg_file_data_new (c->output, F_DATA_WRITE, &out);
1335      if (err)      if (err)
1336          goto leave;          goto leave;
1337        
1338      op_begin ();      op_begin ();
1339      err = gpgme_op_decrypt_verify (ctx, in->dat, out->dat);      err = gpgme_op_decrypt_verify (ctx, in->dat, out->dat);
1340      op_end ();      op_end ();
# Line 1366  fm_decrypt (fm_state_t c, const char *na Line 1371  fm_decrypt (fm_state_t c, const char *na
1371          goto leave;          goto leave;
1372      }      }
1373      else if (res && res->file_name) {      else if (res && res->file_name) {
1374          char *file = strrchr (c->output, '\\');          char *file;
1375          int id = log_box (_("Decrypt"), MB_QUEST_ASK,          int id;
1376                            _("The original file name is '%s'.\n\n"  
1377                              "Do you want to use this instead of '%s'?"),          file = strrchr (c->output, '\\');
1378                              res->file_name, file? file+1 : c->output);          if (!file)
1379                file = c->output;
1380            else
1381                file++;
1382            id = log_box (_("Decrypt"), MB_QUEST_ASK,
1383                          _("The original file name is '%s'.\n\n"
1384                            "Do you want to use this instead of '%s'?"),
1385                          res->file_name, file);
1386          if (id == IDYES) {          if (id == IDYES) {
1387              /* before we can move the file, it needs to be closed first. */              /* before we can move the file, it needs to be closed first. */
1388              gpg_file_data_release (out);              gpg_file_data_release (out);

Legend:
Removed from v.211  
changed lines
  Added in v.214

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26