Switch to unified view

a/src/pathut.cpp b/src/pathut.cpp
...
...
67
        if (s[i] == '\\') {
67
        if (s[i] == '\\') {
68
            s[i] = '/';
68
            s[i] = '/';
69
        }
69
        }
70
    }
70
    }
71
}
71
}
72
void path_backslashize(string& s)
73
{
74
    for (string::size_type i = 0; i < s.size(); i++) {
75
        if (s[i] == '/') {
76
            s[i] = '\\';
77
        }
78
    }
79
}
72
static bool path_strlookslikedrive(const string& s)
80
static bool path_strlookslikedrive(const string& s)
73
{
81
{
74
    return s.size() == 2 && isalpha(s[0]) && s[1] == ':';
82
    return s.size() == 2 && isalpha(s[0]) && s[1] == ':';
75
}
83
}
76
84
...
...
434
            ret += *it;
442
            ret += *it;
435
        }
443
        }
436
    } else {
444
    } else {
437
        ret = "/";
445
        ret = "/";
438
    }
446
    }
447
448
#ifdef _WIN32
449
    // Raw drive needs a final /
450
    if (path_strlookslikedrive(ret)) {
451
        path_catslash(ret);
452
    }
453
#endif
454
439
    return ret;
455
    return ret;
440
}
456
}
441
457
442
bool path_makepath(const string& ipath, int mode)
458
bool path_makepath(const string& ipath, int mode)
443
{
459
{