| 556 | ////////////////////////////////////////////////////////////////////////// |
| 557 | |
| 558 | std::string removeCommonPath(const std::string& _path, const std::string& _common, bool& _contains) |
| 559 | { |
| 560 | const std::string path = getGenericPath(_path); |
| 561 | const std::string common = isDirectory(_common) ? getGenericPath(_common) : getParent(_common); |
| 562 | |
| 563 | // check if path contains common |
| 564 | if(path.find(common) == 0) |
| 565 | { |
| 566 | _contains = true; |
| 567 | return path.substr(common.length() + 1); |
| 568 | } |
| 569 | |
| 570 | // it didn't |
| 571 | _contains = false; |
| 572 | return path; |
| 573 | |
| 574 | } // removeCommonPath |
| 575 | |
| 576 | ////////////////////////////////////////////////////////////////////////// |
| 577 |
no test coverage detected