Changeset 3833 in MondoRescue for branches/3.3/mondo/src/mondorestore


Ignore:
Timestamp:
Mar 5, 2024, 1:24:48 AM (18 months ago)
Author:
Bruno Cornec
Message:

manages tmpdir dynamically

Location:
branches/3.3/mondo/src/mondorestore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.3/mondo/src/mondorestore/mondo-rstr-tools.c

    r3830 r3833  
    18191819void setup_MR_global_filenames()
    18201820{
    1821     char *temppath;
    1822 
    18231821    assert(bkpinfo != NULL);
    18241822
     
    18331831    malloc_string(g_isodir_format);
    18341832
    1835     temppath = bkpinfo->tmpdir;
    1836 
    1837     sprintf(g_biggielist_txt, "%s/%s", temppath, BIGGIELIST_TXT_STUB);
    1838     sprintf(g_filelist_full, "%s/%s", temppath, FILELIST_FULL_STUB);
    1839     sprintf(g_filelist_imagedevs, "%s/tmp/filelist.imagedevs", temppath);
    1840 //  sprintf(g_imagedevs_pot, "%s/tmp/imagedevs.pot", temppath);
     1833    sprintf(g_biggielist_txt, "%s/%s", bkpinfo->tmpdir, BIGGIELIST_TXT_STUB);
     1834    sprintf(g_filelist_full, "%s/%s", bkpinfo->tmpdir, FILELIST_FULL_STUB);
     1835    sprintf(g_filelist_imagedevs, "%s/tmp/filelist.imagedevs", bkpinfo->tmpdir);
     1836//  sprintf(g_imagedevs_pot, "%s/tmp/imagedevs.pot", bkpinfo->tmpdir);
    18411837    sprintf(g_imagedevs_restthese, "%s/tmp/imagedevs.restore-these",
    1842             temppath);
     1838            bkpinfo->tmpdir);
    18431839    if (bkpinfo->disaster_recovery) {
    18441840        sprintf(g_mondo_cfg_file, "/%s", MONDO_CFG_FILE_STUB);
    18451841        sprintf(g_mountlist_fname, "/%s", MOUNTLIST_FNAME_STUB);
    18461842    } else {
    1847         sprintf(g_mondo_cfg_file, "%s/%s", temppath, MONDO_CFG_FILE_STUB);
    1848         sprintf(g_mountlist_fname, "%s/%s", temppath, MOUNTLIST_FNAME_STUB);
     1843        sprintf(g_mondo_cfg_file, "%s/%s", bkpinfo->tmpdir, MONDO_CFG_FILE_STUB);
     1844        sprintf(g_mountlist_fname, "%s/%s", bkpinfo->tmpdir, MOUNTLIST_FNAME_STUB);
    18491845    }
    18501846}
  • branches/3.3/mondo/src/mondorestore/mondorestore.c

    r3832 r3833  
    28202820
    28212821        log_msg(2, "Still here. Yay.");
    2822         if ((strlen(bkpinfo->tmpdir) > 0) && (strstr(bkpinfo->tmpdir,"mondo.tmp.") != NULL)) {
     2822        if ((bkpinfo->tmpdir != NULL) && (strlen(bkpinfo->tmpdir) > 0) && (strstr(bkpinfo->tmpdir,"mondo.tmp.") != NULL)) {
    28232823            mr_asprintf(tmp, "rm -Rf %s/*", bkpinfo->tmpdir);
    28242824            run_program_and_log_output(tmp, FALSE);
Note: See TracChangeset for help on using the changeset viewer.