~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_symlink2.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:
32
32
  /* Test if we should create a link */
33
33
  int create_link;
34
34
  char abs_linkname[FN_REFLEN];
 
35
  char rp_buff[PATH_MAX];
35
36
 
36
37
  if (my_disable_symlinks)
37
38
  {
43
44
  else
44
45
  {
45
46
    if (linkname)
46
 
      my_realpath(abs_linkname, linkname, MYF(0));
 
47
    {
 
48
      if (!realpath(linkname,rp_buff))
 
49
        my_load_path(rp_buff, linkname, NULL);
 
50
      rp_buff[FN_REFLEN-1]= '\0';
 
51
      strcpy(abs_linkname,rp_buff);
 
52
    }
47
53
    create_link= (linkname && strcmp(abs_linkname,filename));
48
54
  }
49
55