File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed
source/intercept/source/collect Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -50,15 +50,19 @@ namespace ic {
5050
5151 std::string Session::keep_front_in_path (const std::string& path, const std::string& paths)
5252 {
53- std::list<fs::path> result = {path};
54-
55- auto existing = sys::path::split (paths);
56- std::copy_if (existing.begin (), existing.end (),
57- std::back_inserter (result),
58- [&path](auto current) { return current != path; }
59- );
60-
61- return sys::path::join (result);
53+ if (paths == path) {
54+ return paths;
55+ } else {
56+ std::list<fs::path> result = {path};
57+
58+ auto existing = sys::path::split (paths);
59+ std::copy_if (existing.begin (), existing.end (),
60+ std::back_inserter (result),
61+ [&path](auto current) { return current != path; }
62+ );
63+
64+ return sys::path::join (result);
65+ }
6266 }
6367
6468 std::string Session::remove_from_path (const std::string& path, const std::string& paths)
You can’t perform that action at this time.
0 commit comments