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

Derek Atkins warlord at cvs.gnucash.org
Sat Jan 29 14:03:45 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.

Tags:
----
gnucash-1-8-branch

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.1461.2.389
retrieving revision 1.1461.2.390
diff -LChangeLog -LChangeLog -u -r1.1461.2.389 -r1.1461.2.390
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,11 @@
+2005-01-29  Derek Atkins  <derek at ihtfp.com>
+
+	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.23.2.8
retrieving revision 1.23.2.9
diff -Lsrc/backend/file/gnc-backend-file.c -Lsrc/backend/file/gnc-backend-file.c -u -r1.23.2.8 -r1.23.2.9
--- src/backend/file/gnc-backend-file.c
+++ src/backend/file/gnc-backend-file.c
@@ -632,6 +632,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