Changeset 1043 in MondoRescue for trunk/mondo/src/mondorestore/mondo-restore.c


Ignore:
Timestamp:
Jan 8, 2007, 11:31:22 PM (14 years ago)
Author:
Bruno Cornec
Message:

merge -r978:1042 $SVN_M/branches/stable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mondo/src/mondorestore/mondo-restore.c

    r973 r1043  
    10021002    char *outfile_fname = NULL;
    10031003    char *tmp = NULL;
     1004    char *tmp0 = NULL;
    10041005    char *tmp1 = NULL;
    10051006    char *tmp2 = NULL;
     
    11571158    for (sliceno = 1, finished = FALSE; !finished;) {
    11581159        tmp = slice_fname(bigfileno, sliceno, ARCHIVES_PATH, "");
     1160        tmp0 = slice_fname(bigfileno, sliceno, ARCHIVES_PATH, "gz");
    11591161        tmp1 = slice_fname(bigfileno, sliceno, ARCHIVES_PATH, "lzo");
    11601162        tmp2 = slice_fname(bigfileno, sliceno, ARCHIVES_PATH, "bz2");
    1161         if (!does_file_exist(tmp) && !does_file_exist(tmp1) &&
     1163        if (!does_file_exist(tmp) &&
     1164            !does_file_exist(tmp0) &&
     1165            !does_file_exist(tmp1) &&
    11621166            !does_file_exist(tmp2)) {
    11631167            log_msg(3,
     
    11901194                if (does_file_exist(tmp1)) {
    11911195                    mr_asprintf(&bzip2_command, "lzop -dc %s 2>> %s",tmp1, MONDO_LOGFILE);
     1196                } else if (does_file_exist(tmp0)) {
     1197                    mr_asprintf(&bzip2_command, "gzip -dc %s 2>> %s",tmp0, MONDO_LOGFILE);
    11921198                } else if (does_file_exist(tmp2)) {
    11931199                        mr_asprintf(&bzip2_command, "bzip2 -dc %s 2>> %s",tmp2, MONDO_LOGFILE);
     
    16161622        if (strstr(tarball_fname, ".bz2")) {
    16171623            mr_asprintf(&executable, "bzip2");
     1624        } else if (strstr(tarball_fname, ".gz")) {
     1625            strcpy(executable, "gzip");
     1626        } else if (strstr(tarball_fname, ".gz")) {
     1627            strcpy(executable, "gzip");
    16181628        } else if (strstr(tarball_fname, ".lzo")) {
    16191629            mr_asprintf(&executable, "lzop");
Note: See TracChangeset for help on using the changeset viewer.