MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / directory_file_name

Function directory_file_name

mysys/my_lib.c:201–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199 */
200
201char * directory_file_name (char * dst, const char *src)
202{
203 /* Process as Unix format: just remove test the final slash. */
204 char *end;
205 DBUG_ASSERT(strlen(src) < (FN_REFLEN + 1));
206
207 if (src[0] == 0)
208 src= (char*) "."; /* Use empty as current */
209 end= strnmov(dst, src, FN_REFLEN + 1);
210 if (end[-1] != FN_LIBCHAR)
211 {
212 end[0]=FN_LIBCHAR; /* Add last '/' */
213 end[1]='\0';
214 }
215 return dst;
216}
217
218#else
219

Callers 1

my_dirFunction · 0.85

Calls 1

strnmovFunction · 0.85

Tested by

no test coverage detected