Fixing common path detection

This commit is contained in:
pjft 2018-03-02 10:07:58 +00:00
parent 566804e682
commit b73d38a781

View file

@ -454,7 +454,7 @@ namespace Utils
std::string common = isDirectory(_common) ? getGenericPath(_common) : getParent(_common); std::string common = isDirectory(_common) ? getGenericPath(_common) : getParent(_common);
// check if path contains common // check if path contains common
if(path.find_first_of(common) == 0) if(path.find(common) == 0)
{ {
_contains = true; _contains = true;
return path.substr(common.length() + 1); return path.substr(common.length() + 1);