src/stored/cloud_dev.c
bool makedir(JCR *jcr, char *path, mode_t mode)
{
   struct stat statp;

   if (mkdir(path, mode) != 0) {
      berrno be;
      if (lstat(path, &statp) != 0) {
         Qmsg2(jcr, M_ERROR, 0, _("Cannot create directory %s: ERR=%s\n"),
              path, be.bstrerror());
         return false;
      } else if (!S_ISDIR(statp.st_mode)) {
         Qmsg1(jcr, M_ERROR, 0, _("%s exists but is not a directory.\n"), path);
         return false;
      }
      return true;                 /* directory exists */
   }
   return true;
}
/*
 * makedir() is a lightly modified copy of the same function
 *   in findlib/mkpath.c
 *
 */
makedir() is a lightly modified copy of the same function
in findlib/mkpath.c
makedir () is a lightly modified copy of the same function in findlib / mkpath . c
bool makedir(JCR *jcr, char *path, mode_t mode)
{
   struct stat statp;
   if (mkdir(path, mode) != 0) {
      berrno be;
      if (lstat(path, &statp) != 0) {
         Qmsg2(jcr, M_ERROR, 0, _("Cannot create directory %s: ERR=%s\n"),
              path, be.bstrerror());
         return false;
      } else if (!S_ISDIR(statp.st_mode)) {
         Qmsg1(jcr, M_ERROR, 0, _("%s exists but is not a directory.\n"), path);
         return false;
      }
      return true;                 
   }
   return true;
}
bool makedir ( JCR * jcr , char * path , mode_t mode ) { struct stat statp ; if ( mkdir ( path , mode ) != 0 ) { berrno be ; if ( lstat ( path , & statp ) != 0 ) { Qmsg2 ( jcr , M_ERROR , 0 , _ ( " \n " ) , path , be . bstrerror ( ) ) ; return false ; } else if ( ! S_ISDIR ( statp . st_mode ) ) { Qmsg1 ( jcr , M_ERROR , 0 , _ ( " \n " ) , path ) ; return false ; } return true ; } return true ; }
makedir() is a lightly modified copy of the same function
   in findlib/mkpath.c
makedir () is a lightly modified copy of the same function in findlib / mkpath . c
/* directory exists */