Ignore:
Timestamp:
Feb 5, 2007, 5:00:16 PM (13 years ago)
Author:
Bruno Cornec
Message:

Addition of mr_mkdir in library and usage in main for MONDO_CACHE creation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/src/mondoarchive/main.c

    r1087 r1100  
    1111/************************* #include statements *************************/
    1212#include <pthread.h>
    13 //#include <config.h>
    14 //#include "../../config.h"
    1513#include <stdio.h>
    1614#include <stdlib.h>
     15#include <sys/types.h>
     16#include <sys/stat.h>
     17#include <unistd.h>
     18
    1719#include "my-stuff.h"
    1820#include "../common/mondostructures.h"
     
    152154{
    153155    struct s_bkpinfo *bkpinfo;
     156    struct stat stbuf;
    154157    char *tmp;
    155158    int res, retval;
     
    202205    setenv("ARCH", tmp, 1);
    203206
    204     /* Add MONDO_SHARE environment variable for mindi */
     207    /* Add MONDO_SHARE + others environment variable for mindi */
    205208    setenv_mondo_share();
     209
     210    if (stat(MONDO_CACHE, &stbuf) != 0) {
     211        mr_mkdir(MONDO_CACHE,0x755);
     212    }
    206213
    207214    /* Configure the bkpinfo structure, global file paths, etc. */
Note: See TracChangeset for help on using the changeset viewer.