2010-01-20 Robert Millan <rmh.grub@aybabtu.com>
* util/misc.c (make_system_path_relative_to_its_root): Work around special-casing of "/", as previous incarnation of this routine did.
This commit is contained in:
parent
cbca0ada62
commit
f66924a414
2 changed files with 12 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2010-01-20 Robert Millan <rmh.grub@aybabtu.com>
|
||||
|
||||
* util/misc.c (make_system_path_relative_to_its_root): Work around
|
||||
special-casing of "/", as previous incarnation of this routine did.
|
||||
|
||||
2010-01-20 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
Fix any-emu compilation.
|
||||
|
|
|
@ -577,6 +577,13 @@ make_system_path_relative_to_its_root (const char *path)
|
|||
len--;
|
||||
}
|
||||
|
||||
/* This works around special-casing of "/" in Un*x. This function never
|
||||
prints trailing slashes (so that its output can be appended a slash
|
||||
unconditionally). Each slash in is considered a preceding slash, and
|
||||
therefore the root directory is an empty string. */
|
||||
if (!strcmp (buf3, "/"))
|
||||
buf3[0] = '\0';
|
||||
|
||||
return buf3;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue