(mc_build_filename): fixed incorrect processing of empty paths.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2011-09-19 14:43:05 +04:00 committed by Slava Zanko
parent b61e0fc6a9
commit b63eea10cb

View File

@ -1018,6 +1018,10 @@ mc_build_filename (const char *first_element, ...)
va_start (args, first_element);
do
{
if (*element == '\0')
element = va_arg (args, char *);
else
{
char *tmp_element;
size_t len;
@ -1037,6 +1041,7 @@ mc_build_filename (const char *first_element, ...)
g_free (tmp_element);
}
}
while (element != NULL);
va_end (args);