~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/mf_format.cc

  • Committer: Eric Lambert
  • Date: 2009-06-16 01:36:01 UTC
  • mto: This revision was merged to the branch mainline in revision 1069.
  • Revision ID: eric.d.lambert@gmail.com-20090616013601-puy8xj5wv8lrxkha
-removed my_realpath from my_symlink and replaced it with calls to posix realpath

Show diffs side-by-side

added added

removed removed

Lines of Context:
96
96
    realpath if the file is a symbolic link
97
97
  */
98
98
  if (flag & MY_RETURN_REAL_PATH)
99
 
    (void) my_realpath(to, to, MYF(flag & MY_RESOLVE_SYMLINKS ?
100
 
                                   MY_RESOLVE_LINK: 0));
 
99
  {
 
100
    struct stat stat_buff;
 
101
    char rp_buff[PATH_MAX];
 
102
    if ((!flag & MY_RESOLVE_SYMLINKS) || 
 
103
       (!lstat(to,&stat_buff)) && S_ISLNK(stat_buff.st_mode))
 
104
    {
 
105
      if (!realpath(to,rp_buff))
 
106
        my_load_path(rp_buff, to, NULL);
 
107
      rp_buff[FN_REFLEN-1]= '\0';
 
108
      strcpy(to,rp_buff);
 
109
    }
 
110
  }
101
111
  else if (flag & MY_RESOLVE_SYMLINKS)
102
112
  {
103
113
    strcpy(buff,to);