[pius-commit] pius pius,1.30,1.31
Brought to you by:
jaymzh
|
From: Phil D. <ja...@us...> - 2010-09-15 21:59:49
|
Update of /cvsroot/pgpius/pius In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv15201 Modified Files: pius Log Message: We need to remove the signed files while we still have the right state to do so. Also, we shouldn't remove them if we haven't done anything with them. This fixes bug 3067157. Signed-off-by: Phil Dibowitz <ph...@ip...> Index: pius =================================================================== RCS file: /cvsroot/pgpius/pius/pius,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- pius 15 Sep 2010 21:23:33 -0000 1.30 +++ pius 15 Sep 2010 21:59:40 -0000 1.31 @@ -820,10 +820,13 @@ # add a newline to all the sys.stdout.write()s print '' - # remote the signed file, if it exists (it might not, if it's - # expired, the user chose not to sign it, etc.) - if os.path.exists(self._outfile_path(uids[index]['file'])): - os.unlink(self._outfile_path(uids[index]['file'])) + # remove the signed file, if it exists (it might not, if it's + # expired, the user chose not to sign it, etc.) + # But don't do this if the ONLY action we're performing is creating those + # files - then the desired result is these files. + if self.encrypt_outfiles or self.mail: + if os.path.exists(self._outfile_path(uids[index]['file'])): + os.unlink(self._outfile_path(uids[index]['file'])) if self.verbose: self.print_filenames(uids) |