MDEV-4734 Adding ending / to a directory can fail when the directory ends with 0
+1 typo fixed
This commit is contained in:
parent
1c6394e503
commit
f3c63615d8
@ -98,8 +98,8 @@ static char *directory_file_name (char * dst, const char *src)
|
|||||||
|
|
||||||
if (src[0] == 0)
|
if (src[0] == 0)
|
||||||
src= (char*) "."; /* Use empty as current */
|
src= (char*) "."; /* Use empty as current */
|
||||||
end=strmov(dst, src);
|
end= strnmov(dst, src, FN_REFLEN + 1);
|
||||||
if (end[-1] != FN_LIBCHAR + 1)
|
if (end[-1] != FN_LIBCHAR)
|
||||||
{
|
{
|
||||||
*end++= FN_LIBCHAR; /* Add last '/' */
|
*end++= FN_LIBCHAR; /* Add last '/' */
|
||||||
*end='\0';
|
*end='\0';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user