Add support for paths without trailing separator in TemporaryFile

This commit is contained in:
Ezra Buehler 2013-10-02 18:04:38 +02:00
parent 4923172241
commit bfa9d0d516

View File

@ -154,6 +154,10 @@ std::string TemporaryFile::tempName(const std::string& tempDir)
unsigned long n = count++; unsigned long n = count++;
mutex.unlock(); mutex.unlock();
name << (tempDir.empty() ? Path::temp() : tempDir); name << (tempDir.empty() ? Path::temp() : tempDir);
if (name.str().at(name.str().size() - 1) != Path::separator())
{
name << Path::separator();
}
#if defined(POCO_VXWORKS) #if defined(POCO_VXWORKS)
name << "tmp"; name << "tmp";
#else #else