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

Diff for /src/usr.bin/patch/util.c between version 1.30 and 1.31

version 1.30, 2005/05/16 15:22:46 version 1.31, 2005/06/20 07:14:06
Line 307 
Line 307 
 makedirs(const char *filename, bool striplast)  makedirs(const char *filename, bool striplast)
 {  {
         char    *tmpbuf;          char    *tmpbuf;
         mode_t mode, dir_mode;  
   
         if ((tmpbuf = strdup(filename)) == NULL)          if ((tmpbuf = strdup(filename)) == NULL)
                 fatal("out of memory\n");                  fatal("out of memory\n");
Line 318 
Line 317 
                         return; /* nothing to be done */                          return; /* nothing to be done */
                 *s = '\0';                  *s = '\0';
         }          }
         mode = 0777 & ~umask(0);          if (mkpath(tmpbuf) != 0)
         dir_mode = mode | S_IWUSR | S_IXUSR;  
         if (mkpath(tmpbuf, mode, dir_mode) != 0)  
                 pfatal("creation of %s failed", tmpbuf);                  pfatal("creation of %s failed", tmpbuf);
         free(tmpbuf);          free(tmpbuf);
 }  }

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31