Index: path.cpp =================================================================== --- path.cpp (revision 73013) +++ path.cpp (working copy) @@ -225,12 +225,15 @@ size_type pos(m_pathname.rfind(dot)); if (pos != string_type::npos && pos >= filename_pos(m_pathname, m_pathname.size())) m_pathname.erase(pos); + + if (!source.empty()) + { + // append source extension + if (source.m_pathname[0] != dot) + m_pathname.push_back(dot); + m_pathname.append(source.m_pathname); + } - // append source extension if any - pos = source.m_pathname.rfind(dot); - if (pos != string_type::npos) - m_pathname += source.c_str() + pos; - return *this; }