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

Diff for /src/usr.bin/mg/dired.c between version 1.56 and 1.57

version 1.56, 2013/05/29 19:16:48 version 1.57, 2013/05/30 04:17:25
Line 623 
Line 623 
 int  int
 d_create_directory(int f, int n)  d_create_directory(int f, int n)
 {  {
         char     tocreate[MAXPATHLEN], *bufp;          int ret;
         size_t  off;  
         struct buffer   *bp;          struct buffer   *bp;
   
         off = strlcpy(tocreate, curbp->b_fname, sizeof(tocreate));          ret = do_makedir();
         if (off >= sizeof(tocreate) - 1)          if (ret != TRUE)
                 return (FALSE);                  return(ret);
         if ((bufp = eread("Create directory: ", tocreate,  
             sizeof(tocreate), EFDEF | EFNEW | EFCR)) == NULL)  
                 return (ABORT);  
         else if (bufp[0] == '\0')  
                 return (FALSE);  
         if (mkdir(tocreate, 0755) == -1) {  
                 ewprintf("Creating directory: %s, %s", strerror(errno),  
                     tocreate);  
                 return (FALSE);  
         }  
         if ((bp = refreshbuffer(curbp)) == NULL)          if ((bp = refreshbuffer(curbp)) == NULL)
                 return (FALSE);                  return (FALSE);
   
         return (showbuffer(bp, curwp, WFFULL | WFMODE));          return (showbuffer(bp, curwp, WFFULL | WFMODE));
 }  }
   

Legend:
Removed from v.1.56  
changed lines
  Added in v.1.57