[BACK]Return to checkout.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / cvs

Diff for /src/usr.bin/cvs/checkout.c between version 1.22 and 1.23

version 1.22, 2005/05/24 04:12:25 version 1.23, 2005/05/24 20:04:43
Line 25 
Line 25 
  */   */
   
 #include <sys/types.h>  #include <sys/types.h>
   #include <sys/stat.h>
   
 #include <errno.h>  #include <errno.h>
 #include <stdio.h>  #include <stdio.h>
Line 59 
Line 60 
         NULL,          NULL,
         NULL,          NULL,
         NULL,          NULL,
         CVS_CMD_ALLOWSPEC | CVS_CMD_SENDDIR | CVS_CMD_SENDARGS2          CVS_CMD_ALLOWSPEC | CVS_CMD_SENDDIR
 };  };
   
 static char *date, *rev, *koptstr, *tgtdir, *rcsid;  static char *date, *rev, *koptstr, *tgtdir, *rcsid;
Line 152 
Line 153 
 cvs_checkout_pre_exec(struct cvsroot *root)  cvs_checkout_pre_exec(struct cvsroot *root)
 {  {
         int i;          int i;
           char *sp;
   
         /* create any required base directories */  
         for (i = 0; i < co_nmod; i++) {          for (i = 0; i < co_nmod; i++) {
                 if (cvs_file_create(NULL, co_mods[i], DT_DIR, 0755) < 0)                  if ((sp = strchr(co_mods[i], '/')) != NULL)
                           *sp = '\0';
   
                   if ((mkdir(co_mods[i], 0755) == -1) && (errno != EEXIST)) {
                           cvs_log(LP_ERRNO, "can't create base directory '%s'",
                               co_mods[i]);
                         return (CVS_EX_DATA);                          return (CVS_EX_DATA);
                   }
   
                   if (cvs_mkadmin(co_mods[i], root->cr_str, co_mods[i]) < 0) {
                           cvs_log(LP_ERROR, "can't create base directory '%s'",
                               co_mods[i]);
                           return (CVS_EX_DATA);
                   }
   
                   if (sp != NULL)
                           *sp = '/';
         }          }
   
         if (root->cr_method != CVS_METHOD_LOCAL) {          if (root->cr_method != CVS_METHOD_LOCAL) {

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23