Actual fix for DATADIR

This commit is contained in:
mathusummut
2019-04-04 23:25:28 +02:00
parent 73cc3dcf4e
commit aa7c0b4dca
3 changed files with 4 additions and 3 deletions

View File

@@ -240,7 +240,7 @@ namespace Shared {
bool StartsWith(const std::string &str, const std::string &key); bool StartsWith(const std::string &str, const std::string &key);
bool EndsWith(const string &str, const string& key); bool EndsWith(const string &str, const string& key);
void endPathWithSlash(string &path, bool requireOSSlash = false); string endPathWithSlash(string &path, bool requireOSSlash = false);
void trimPathWithStartingSlash(string &path); void trimPathWithStartingSlash(string &path);
void updatePathClimbingParts(string &path, bool processPreviousDirTokenCheck = true); void updatePathClimbingParts(string &path, bool processPreviousDirTokenCheck = true);
string formatPath(string path); string formatPath(string path);

View File

@@ -552,7 +552,7 @@ namespace Shared {
return result; return result;
} }
void endPathWithSlash(string &path, bool requireOSSlash) { string endPathWithSlash(string &path, bool requireOSSlash) {
if (EndsWith(path, "/") == false && EndsWith(path, "\\") == false) { if (EndsWith(path, "/") == false && EndsWith(path, "\\") == false) {
string seperator = "/"; string seperator = "/";
if (requireOSSlash == true) { if (requireOSSlash == true) {
@@ -562,6 +562,7 @@ namespace Shared {
} }
path += seperator; path += seperator;
} }
return path
} }
string formatPath(string path) { string formatPath(string path) {