| 45 | |
| 46 | #ifdef _WIN32 |
| 47 | std::wstring ParentDirectory(const std::wstring& fileName) { |
| 48 | const size_t slash = fileName.find_last_of(L"\\/"); |
| 49 | if (slash == std::wstring::npos) { |
| 50 | return L".\\"; |
| 51 | } |
| 52 | return fileName.substr(0, slash + 1); |
| 53 | } |
| 54 | #else |
| 55 | std::string ParentDirectory(const std::string& fileName) { |
| 56 | const size_t slash = fileName.find_last_of('/'); |
no test coverage detected