--- newt-specific.c.orig 2007-09-02 22:06:16.000000000 -0500 +++ newt-specific.c 2007-09-08 21:25:23.000000000 -0500 @@ -1484,9 +1484,10 @@ int load_filelist_into_array(struct s_filelist *filelist, char *source_file) { int i; + int j; bool done; char *tmp; - FILE *fin; + FILE *fin, *fout; struct s_filelist_entry dummy_fle; malloc_string(tmp); @@ -1501,7 +1502,15 @@ paranoid_free(tmp); return (1); } + + if (!(fout = fopen("/tmp/icantfindthesefiles.txt", "a"))) { + fatal_error("Cannot open icantfindthesefiles.txt"); + } + + + log_msg(2, "Loading %s", source_file); + j = 0; for (filelist->entries = 0; filelist->entries <= ARBITRARY_MAXIMUM; filelist->entries++) { god_i_hate_gotos: @@ -1519,7 +1528,10 @@ if (i < 2) { goto god_i_hate_gotos; } - if (!does_file_exist(tmp)) { + if (!does_file_exist(tmp) && !feof(fin)) { + j++; + fprintf(fout, "%s\n", tmp); + goto god_i_hate_gotos; } filelist->el[filelist->entries].severity = @@ -1530,6 +1542,8 @@ } } paranoid_fclose(fin); + paranoid_fclose(fout); + log_to_screen("%d files listed in /tmp/changed.files have been deleted since backup was made", j); if (filelist->entries >= ARBITRARY_MAXIMUM) { log_to_screen("Arbitrary limits suck, man!"); paranoid_free(tmp);