forked from Mirrors/wine-wine
relpath: Properly handle a "." directory name.
parent
dd8f067fb0
commit
65c9113e8f
|
@ -30,6 +30,9 @@ static const char *get_relative_path( const char *from, const char *dest, unsign
|
||||||
#define DIR_END(p) (*(p) == 0 || *(p) == '/')
|
#define DIR_END(p) (*(p) == 0 || *(p) == '/')
|
||||||
const char *start;
|
const char *start;
|
||||||
|
|
||||||
|
/* a path of "." is equivalent to an empty path */
|
||||||
|
if (!strcmp( from, "." )) from = "";
|
||||||
|
|
||||||
*dotdots = 0;
|
*dotdots = 0;
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue