~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/mf_path.cc

  • Committer: Brian Aker
  • Date: 2008-11-13 02:56:15 UTC
  • mfrom: (575.4.10 devel)
  • Revision ID: brian@tangent.org-20081113025615-snhsi52yb2ivmx6f
Merging Monty's code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
    intern_filename(to,to);
46
46
    if (!test_if_hard_path(to))
47
47
    {
48
 
      if (!my_getwd(curr_dir,FN_REFLEN,MYF(0)))
 
48
      if (!getcwd(curr_dir,FN_REFLEN))
49
49
        bchange((unsigned char*) to, 0, (unsigned char*) curr_dir, strlen(curr_dir), strlen(to)+1);
50
50
    }
51
51
  }
102
102
  }
103
103
  return NULL;                          /* File not found */
104
104
}
 
105
 
 
106
        /* Test if hard pathname */
 
107
        /* Returns true if dirname is a hard path */
 
108
 
 
109
bool test_if_hard_path(register const char *dir_name)
 
110
{
 
111
  if (dir_name[0] == FN_HOMELIB && dir_name[1] == FN_LIBCHAR)
 
112
    return (home_dir != NULL && test_if_hard_path(home_dir));
 
113
  if (dir_name[0] == FN_LIBCHAR)
 
114
    return (true);
 
115
  return false;
 
116
} /* test_if_hard_path */
 
117