| 112 | } |
| 113 | |
| 114 | static std::string getSearchName(const std::string& filename) { |
| 115 | std::string cleaned = Slice(filename).toLower(); |
| 116 | if (!cleaned.empty()) { |
| 117 | size_t pos = 0; |
| 118 | while ((pos = cleaned.find("\\", pos)) != std::string::npos) { |
| 119 | cleaned[pos] = '/'; |
| 120 | } |
| 121 | while (!cleaned.empty() && cleaned.back() == '/') { |
| 122 | cleaned.erase(--cleaned.end()); |
| 123 | } |
| 124 | if (cleaned == "."sv) cleaned.clear(); |
| 125 | } |
| 126 | return cleaned; |
| 127 | } |
| 128 | |
| 129 | static bool isDirectChildPath(const std::string& entry, const std::string& parent) { |
| 130 | if (parent.empty()) return !entry.empty(); |
no test coverage detected