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

Diff for /src/usr.bin/cvs/file.c between version 1.19 and 1.20

version 1.19, 2004/08/03 04:28:15 version 1.20, 2004/08/03 04:41:19
Line 364 
Line 364 
         char fbuf[2048], pbuf[MAXPATHLEN];          char fbuf[2048], pbuf[MAXPATHLEN];
         struct dirent *ent;          struct dirent *ent;
         CVSFILE *cfp;          CVSFILE *cfp;
           struct stat st;
         struct cvs_dir *cdp;          struct cvs_dir *cdp;
         struct cvs_flist dirs;          struct cvs_flist dirs;
   
Line 371 
Line 372 
         TAILQ_INIT(&dirs);          TAILQ_INIT(&dirs);
         cdp = cf->cf_ddat;          cdp = cf->cf_ddat;
   
         if (cvs_readrepo(cf->cf_path, pbuf, sizeof(pbuf)) == 0) {  
                 cdp->cd_repo = strdup(pbuf);  
                 if (cdp->cd_repo == NULL) {  
                         free(cdp);  
                         return (-1);  
                 }  
         }  
   
         cdp->cd_root = cvsroot_get(cf->cf_path);          cdp->cd_root = cvsroot_get(cf->cf_path);
         if (cdp->cd_root == NULL) {          if (cdp->cd_root == NULL) {
                 cvs_file_freedir(cdp);                  cvs_file_freedir(cdp);
Line 388 
Line 381 
         if (flags & CF_MKADMIN)          if (flags & CF_MKADMIN)
                 cvs_mkadmin(cf, 0755);                  cvs_mkadmin(cf, 0755);
   
         cdp->cd_ent = cvs_ent_open(cf->cf_path, O_RDONLY);          /* if the CVS administrative directory exists, load the info */
           snprintf(pbuf, sizeof(pbuf), "%s/" CVS_PATH_CVSDIR, cf->cf_path);
           if ((stat(pbuf, &st) == 0) && S_ISDIR(st.st_mode)) {
                   if (cvs_readrepo(cf->cf_path, pbuf, sizeof(pbuf)) == 0) {
                           cdp->cd_repo = strdup(pbuf);
                           if (cdp->cd_repo == NULL) {
                                   free(cdp);
                                   return (-1);
                           }
                   }
   
                   cdp->cd_ent = cvs_ent_open(cf->cf_path, O_RDONLY);
           }
   
         fd = open(cf->cf_path, O_RDONLY);          fd = open(cf->cf_path, O_RDONLY);
         if (fd == -1) {          if (fd == -1) {

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20