[Gnucash-changes] Thomas Bushnell's patch to protect non-backup pruning (#164875).

Derek Atkins warlord at cvs.gnucash.org
Sat Jan 29 14:03:31 EST 2005


Log Message:
-----------
Thomas Bushnell's patch to protect non-backup pruning (#164875).

	* src/backend/file/gnc-backend-file.c:
	  When working on the file foo.xac, backups are named
	  foo.DATE.xac.  But the backup file pruner will prune any old
	  file named foo.DATE.anything.

Modified Files:
--------------
    gnucash:
        ChangeLog
    gnucash/src/backend/file:
        gnc-backend-file.c

Revision Data
-------------
Index: ChangeLog
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/ChangeLog,v
retrieving revision 1.1883
retrieving revision 1.1884
diff -LChangeLog -LChangeLog -u -r1.1883 -r1.1884
--- ChangeLog
+++ ChangeLog
@@ -10,6 +10,12 @@
 	  (lone zb subtotals, spurious 'recursive-bal, typos)
 	  needed to make the new account-summary.scm work.
 
+	Thomas Bushnell's patch to protect non-backup pruning (#164875)
+	* src/backend/file/gnc-backend-file.c:
+	  When working on the file foo.xac, backups are named
+	  foo.DATE.xac.  But the backup file pruner will prune any old
+	  file named foo.DATE.anything.
+
 2005-01-29  Christian Stimming  <stimming at tuhh.de>
 
 	* configure.in, src/tax/us/gncmod-tax-us.c,
Index: gnc-backend-file.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/gnc-backend-file.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -Lsrc/backend/file/gnc-backend-file.c -Lsrc/backend/file/gnc-backend-file.c -u -r1.40 -r1.41
--- src/backend/file/gnc-backend-file.c
+++ src/backend/file/gnc-backend-file.c
@@ -665,6 +665,7 @@
                 /* Make sure this file actually has a date before unlinking */
                 if (res && res != name+pathlen+1 &&
                     /* We consumed some but not all of the filename */
+		    !strcmp(res, ".xac") &&
                     file_time > 0 &&
                     /* we actually have a reasonable time and it is old enough */
                     days > file_retention_days) 


More information about the gnucash-changes mailing list