Changeset 1043 in MondoRescue for trunk/mondo/src/mondorestore
- Timestamp:
- Jan 8, 2007, 11:31:22 PM (17 years ago)
- Location:
- trunk/mondo/src/mondorestore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/src/mondorestore/mondo-restore.c
r973 r1043 1002 1002 char *outfile_fname = NULL; 1003 1003 char *tmp = NULL; 1004 char *tmp0 = NULL; 1004 1005 char *tmp1 = NULL; 1005 1006 char *tmp2 = NULL; … … 1157 1158 for (sliceno = 1, finished = FALSE; !finished;) { 1158 1159 tmp = slice_fname(bigfileno, sliceno, ARCHIVES_PATH, ""); 1160 tmp0 = slice_fname(bigfileno, sliceno, ARCHIVES_PATH, "gz"); 1159 1161 tmp1 = slice_fname(bigfileno, sliceno, ARCHIVES_PATH, "lzo"); 1160 1162 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) && 1162 1166 !does_file_exist(tmp2)) { 1163 1167 log_msg(3, … … 1190 1194 if (does_file_exist(tmp1)) { 1191 1195 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); 1192 1198 } else if (does_file_exist(tmp2)) { 1193 1199 mr_asprintf(&bzip2_command, "bzip2 -dc %s 2>> %s",tmp2, MONDO_LOGFILE); … … 1616 1622 if (strstr(tarball_fname, ".bz2")) { 1617 1623 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"); 1618 1628 } else if (strstr(tarball_fname, ".lzo")) { 1619 1629 mr_asprintf(&executable, "lzop"); -
trunk/mondo/src/mondorestore/mondo-rstr-compare.c
r900 r1043 241 241 if (strstr(tarball_fname, ".bz2")) { 242 242 mr_asprintf(&compressor_exe, "bzip2"); 243 } else if (strstr(tarball_fname, ".gz")) { 244 strcpy(compressor_exe, "gzip"); 245 } else if (strstr(tarball_fname, ".gz")) { 246 strcpy(compressor_exe, "gzip"); 243 247 } else if (strstr(tarball_fname, ".lzo")) { 244 248 mr_asprintf(&compressor_exe, "lzop"); -
trunk/mondo/src/mondorestore/mondo-rstr-tools.c
r972 r1043 952 952 mr_allocstr(bkpinfo->zip_exe, "lzop"); 953 953 mr_allocstr(bkpinfo->zip_suffix, "lzo"); 954 bkpinfo->use_gzip = FALSE; 954 955 } else { 955 956 mr_free(value); 956 read_cfg_var(cfg_file, "use- comp", value);957 read_cfg_var(cfg_file, "use-gzip", value); 957 958 if (strstr(value, "yes")) { 958 959 bkpinfo->use_lzo = FALSE; 959 mr_allocstr(bkpinfo->zip_exe, "bzip2"); 960 mr_allocstr(bkpinfo->zip_suffix, "bz2"); 960 bkpinfo->use_gzip = TRUE; 961 mr_allocstr(bkpinfo->zip_exe, "gzip"); 962 mr_allocstr(bkpinfo->zip_suffix, "gz"); 961 963 } else { 962 // Just to be sure 963 bkpinfo->zip_exe = NULL; 964 bkpinfo->zip_suffix = NULL; 964 read_cfg_var(cfg_file, "use-comp", value); 965 if (strstr(value, "yes")) { 966 bkpinfo->use_lzo = FALSE; 967 bkpinfo->use_gzip = FALSE; 968 mr_allocstr(bkpinfo->zip_exe, "bzip2"); 969 mr_allocstr(bkpinfo->zip_suffix, "bz2"); 970 } else { 971 // Just to be sure 972 bkpinfo->zip_exe = NULL; 973 bkpinfo->zip_suffix = NULL; 974 } 965 975 } 966 976 }
Note:
See TracChangeset
for help on using the changeset viewer.