diff options
Diffstat (limited to '')
-rw-r--r-- | src/OSSupport/File.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/OSSupport/File.cpp b/src/OSSupport/File.cpp index 8957dfaef..1ee9feafe 100644 --- a/src/OSSupport/File.cpp +++ b/src/OSSupport/File.cpp @@ -453,6 +453,29 @@ AString cFile::ReadWholeFile(const AString & a_FileName) +AString cFile::ReplaceFileNameInvalidChars(const AString & a_FileName, char a_Replacement) +{ + AString res(a_FileName); + for (auto & ch: res) + { + switch (ch) + { + case ':': + case '\\': + case '/': + { + ch = a_Replacement; + break; + } + } + } + return res; +} + + + + + int cFile::Printf(const char * a_Fmt, ...) { AString buf; |