Merge pull request #486 from pmcgvr/release

Fix stripping of slashes from paths
This commit is contained in:
Syoyo Fujita 2024-05-24 02:49:22 +09:00 committed by GitHub
commit f03fe26579
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2245,7 +2245,7 @@ static std::string GetFilePathExtension(const std::string &FileName) {
static std::string GetBaseDir(const std::string &filepath) {
if (filepath.find_last_of("/\\") != std::string::npos)
return filepath.substr(0, filepath.find_last_of("/\\"));
return filepath.substr(0, filepath.find_last_of("/\\") + 1);
return "";
}