Fixed up path_get_slash return value

This commit is contained in:
cold-brewed
2023-08-22 15:11:37 -04:00
parent 6f4a3ebb9e
commit f37474246b
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