Merge pull request #3624 from cold-brewed/path-get-slash

Fixing up path_get_slash return value
This commit is contained in:
Miran Grča
2023-08-23 20:45:27 +02:00
committed by GitHub
4 changed files with 5 additions and 11 deletions

View File

@@ -304,16 +304,10 @@ path_slash(char *path)
path_normalize(path);
}
char *
const char *
path_get_slash(char *path)
{
auto len = strlen(path);
std::string ret = "";
if (path[len - 1] != '/')
ret = "/";
return (char *) ret.c_str();
return QString(path).endsWith("/") ? "" : "/";
}
void