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:
Robert Millan 2010-01-20 14:40:00 +00:00
parent cbca0ada62
commit f66924a414
2 changed files with 12 additions and 0 deletions

View file

@ -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.

View file

@ -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;
}