Improvements to path handling. Patch from bit.

This commit is contained in:
SarahW 2017-07-06 21:25:10 +01:00
commit 807b710a5d
55 changed files with 588 additions and 368 deletions

View file

@ -190,8 +190,6 @@ void config_load(int is_global, char *fn)
}
fclose(f);
config_dump(is_global);
}
@ -353,6 +351,18 @@ void append_filename(char *dest, char *s1, char *s2, int size)
sprintf(dest, "%s%s", s1, s2);
}
void append_slash(char *s, int size)
{
int c = strlen(s)-1;
if (s[c] != '/' && s[c] != '\\')
{
if (c < size-2)
strcat(s, "/");
else
s[c] = '/';
}
}
void put_backslash(char *s)
{
int c = strlen(s) - 1;