diff options
Diffstat (limited to 'src/utils/paths.cpp')
-rw-r--r-- | src/utils/paths.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/utils/paths.cpp b/src/utils/paths.cpp index c00a3f39d..228276efd 100644 --- a/src/utils/paths.cpp +++ b/src/utils/paths.cpp @@ -85,9 +85,7 @@ std::string removeLast(std::string str) if (pos2 == std::string::npos || pos3 > pos2) pos2 = pos3; } - if (pos2 == std::string::npos) - pos2 = -1; - if (pos2 >= 0) + if (pos2 != std::string::npos) return str.substr(0, pos2); else return str; |