New C++ version for PathCopy()

This commit is contained in:
Stas Degteff 2011-02-17 23:00:49 +00:00
parent b7e669bf1e
commit bfd77e1a19

View File

@ -101,11 +101,17 @@ void PathCopy(std::string& dst, const char* src) {
strschg_environ(dst); strschg_environ(dst);
AddBackslash(dst); AddBackslash(dst);
} }
void PathCopy(std::string& dst, const std::string& src) {
dst = src;
strschg_environ(dst);
AddBackslash(dst);
}
// ------------------------------------------------------------------ // ------------------------------------------------------------------
// DOS-style enviroment variables substitution in string. // DOS-style enviroment variables substitution in string.
// Unix-style tilde substitution in string. // In unix-like enviroment also tilde substitution in string.
int strschg_environ(std::string& s) { int strschg_environ(std::string& s) {