Jeff Layton that we were converting \ to / in the posix path case which is
not always right (depends on what the old delim was).
CC: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
convert_delimiter(char *path, char delim)
{
int i;
convert_delimiter(char *path, char delim)
{
int i;
if (path == NULL)
return;
if (path == NULL)
return;
+ if (delim == '/')
+ old_delim = '\\';
+ else
+ old_delim = '/';
+
for (i = 0; path[i] != '\0'; i++) {
for (i = 0; path[i] != '\0'; i++) {
- if ((path[i] == '/') || (path[i] == '\\'))
+ if (path[i] == old_delim)