Changeset 1655 in MondoRescue for branches/2.2.5/mondo/src/common/libmondo-tools.c
- Timestamp:
- Sep 25, 2007, 12:54:32 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.5/mondo/src/common/libmondo-tools.c
r1654 r1655 617 617 } 618 618 make_hole_for_dir(bkpinfo->scratchdir); 619 make_hole_for_dir(bkpinfo->tmpdir);620 619 if (bkpinfo->backup_media_type == iso) 621 620 make_hole_for_dir(bkpinfo->isodir); … … 902 901 } 903 902 chmod(bkpinfo->scratchdir, 0700); 904 chmod(bkpinfo->tmpdir, 0700);905 903 g_backup_media_type = bkpinfo->backup_media_type; 906 904 paranoid_free(mtpt); … … 963 961 } 964 962 965 void setup_tmpdir( ) {963 void setup_tmpdir(char *path) { 966 964 967 965 char *tmp = NULL; 968 966 char *p = NULL; 969 967 968 if (bkpinfo->tmpdir != NULL) { 969 /* purging a potential old tmpdir */ 970 asprintf(&tmp,"rm -Rf %s",bkpinfo->tmpdir); 971 run_program_and_log_output(tmp, FALSE); 972 paranoid_free(tmp); 973 } 974 970 975 if (getenv("TMPDIR")) { 971 976 asprintf(&tmp, "%s/mondo.tmp.XXXXXX", getenv("TMPDIR")); 972 977 } else if (getenv("TMP")) { 973 978 asprintf(&tmp, "%s/mondo.tmp.XXXXXX", getenv("TMP")); 979 } else if (path != NULL) { 980 asprintf(&tmp, "%s/mondo.tmp.XXXXXX", path); 974 981 } else { 975 982 asprintf(&tmp, "/tmp/mondo.tmp.XXXXXX");
Note:
See TracChangeset
for help on using the changeset viewer.