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

Diff for /src/usr.bin/mg/fileio.c between version 1.46 and 1.47

version 1.46, 2005/03/09 16:20:48 version 1.47, 2005/03/10 16:46:24
Line 244 
Line 244 
 char *  char *
 adjustname(const char *fn)  adjustname(const char *fn)
 {  {
         static char path[MAXPATHLEN];          static char fnb[MAXPATHLEN];
         const char *cp;          const char *cp;
         char user[LOGIN_NAME_MAX + 1];          char user[LOGIN_NAME_MAX + 1], path[MAXPATHLEN];
         int len;          int len;
   
         path[0] = '\0';          path[0] = '\0';
Line 283 
Line 283 
         }          }
         strlcat(path, fn, sizeof path);          strlcat(path, fn, sizeof path);
   
         return (path);          if (realpath(path, fnb) == NULL)
                   strlcpy(fnb, path, sizeof(fnb));
   
           return (fnb);
 }  }
   
 #ifndef NO_STARTUP  #ifndef NO_STARTUP

Legend:
Removed from v.1.46  
changed lines
  Added in v.1.47