Ignore:
Timestamp:
Sep 26, 2007, 12:57:09 PM (17 years ago)
Author:
Bruno Cornec
Message:

Fix bug #197 (based on an initial patch of Scott Cummings)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.5/mondo/src/common/newt-specific.c

    r1644 r1662  
    14841484                                 char *source_file) {
    14851485        int i;
     1486        int j = 0;
    14861487        bool done;
    14871488        char *tmp;
    1488         FILE *fin;
     1489        char *tmp1 = NULL;
     1490        FILE *fin, *fout;
    14891491        struct s_filelist_entry dummy_fle;
    14901492
    1491         malloc_string(tmp);
    14921493        assert(filelist != NULL);
    14931494        assert_string_is_neither_NULL_nor_zerolength(source_file);
     
    14981499            log_msg(2, "Can't open %s; therefore, cannot popup list",
    14991500                    source_file);
    1500             paranoid_free(tmp);
    15011501            return (1);
    15021502        }
     1503
     1504        asprintf(&tmp1,"%s/icantfindthesefiles.txt",bkpinfo->tmpdir);
     1505        if (!(fout = fopen(tmp1, "a"))) {
     1506            log_msg(2, "Can't write to %s", tmp1);
     1507            return(1);
     1508            }
     1509
     1510        malloc_string(tmp);
    15031511        log_msg(2, "Loading %s", source_file);
    15041512        for (filelist->entries = 0; filelist->entries <= ARBITRARY_MAXIMUM;
     
    15191527                goto god_i_hate_gotos;
    15201528            }
    1521             if (!does_file_exist(tmp)) {
     1529            if (!does_file_exist(tmp) && !feof(fin)) {
     1530                j++;
     1531                fprintf(fout, "%s\n", tmp);
     1532
    15221533                goto god_i_hate_gotos;
    15231534            }
     
    15301541        }
    15311542        paranoid_fclose(fin);
     1543        paranoid_fclose(fout);
     1544        if (j > 0) {
     1545            log_to_screen("%d files listed in %s/changed.files have been deleted since backup was made\nand are referenced in %s", j, bkpinfo->tmpdir,tmp1);
     1546        }
     1547        paranoid_free(tmp1);
    15321548        if (filelist->entries >= ARBITRARY_MAXIMUM) {
    15331549            log_to_screen("Arbitrary limits suck, man!");
Note: See TracChangeset for help on using the changeset viewer.