Change according to review

This commit is contained in:
Bezierr
2022-09-01 14:48:29 +02:00
parent 24f5d85c8d
commit 136bc37154

View File

@@ -221,16 +221,16 @@ bool DynamicProfileRules::loadRules()
rule.profilepath = kf.get_string (group, "profilepath");
#if defined (WIN32)
// if this is Windows, replace any "/" in the path with "\\"
int pos = rule.profilepath.find("/");
while (pos != -1) {
size_t pos = rule.profilepath.find("/");
while (pos != Glib::ustring::npos) {
rule.profilepath.replace(pos, 1, "\\");
pos = rule.profilepath.find("/", pos);
}
#endif
#if !defined (WIN32)
// if this is not Windows, replace any "\\" in the path with "/"
int pos = rule.profilepath.find("\\");
while (pos != -1) {
size_t pos = rule.profilepath.find("\\");
while (pos != Glib::ustring::npos) {
rule.profilepath.replace(pos, 1, "/");
pos = rule.profilepath.find("\\", pos);
}