Skip to content

Commit

Permalink
Backported fix for bug CORE-2151 : Temp directory with space in the m…
Browse files Browse the repository at this point in the history
…iddle wrongly truncated from the rightmost space
  • Loading branch information
hvlad committed Oct 27, 2008
1 parent f947054 commit f5c1932
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
12 changes: 0 additions & 12 deletions src/common/config/dir_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,18 +257,6 @@ const
return true;
}

void TempDirectoryList::initTemp()
{
initialize(true);

// Iterate through directories to parse them
for (size_t i = 0; i < getCount(); i++) {
PathName dir = (*this)[i];
size_t pos = dir.rfind(" ");
(*this)[i] = ParsedPath(dir.substr(0, pos));
}
}

const PathName TempDirectoryList::getConfigString() const
{
const char* value = Config::getTempDirectories();
Expand Down
7 changes: 2 additions & 5 deletions src/common/config/dir_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,19 +124,16 @@ class TempDirectoryList : public DirectoryList {
explicit TempDirectoryList(MemoryPool& p)
: DirectoryList(p)
{
initTemp();
initialize(true);
}
TempDirectoryList()
{
initTemp();
initialize(true);
}

private:
// implementation of the inherited function
const PathName getConfigString() const;

// load items from DirectoryList
void initTemp();
};

} //namespace Firebird
Expand Down

0 comments on commit f5c1932

Please sign in to comment.