Exemple #1
0
void LLDir::setPerAccountChatLogsDir(const std::string &grid, const std::string &first, const std::string &last)
{
	// if both first and last aren't set, assume we're grabbing the cached dir
	if (!first.empty() && !last.empty())
	{
		// some platforms have case-sensitive filesystems, so be
		// utterly consistent with our firstname/lastname case.
		std::string firstlower(first);
		LLStringUtil::toLower(firstlower);
		std::string lastlower(last);
		LLStringUtil::toLower(lastlower);
		mPerAccountChatLogsDir = getChatLogsDir();
		mPerAccountChatLogsDir += mDirDelimiter;
		mPerAccountChatLogsDir += firstlower;
		mPerAccountChatLogsDir += "_";
		mPerAccountChatLogsDir += lastlower;

		if (!grid.empty())
		{
			std::string gridlower(grid);
			LLStringUtil::toLower(gridlower);
			mPerAccountChatLogsDir += "@";
			mPerAccountChatLogsDir += gridlower;
		}
	}
	else
	{
		llwarns << "Invalid name for LLDir::setPerAccountChatLogsDir" << llendl;
	}
}
Exemple #2
0
void LLDir::setLindenUserDir(const std::string &first, const std::string &last)
{
	// if both first and last aren't set, assume we're grabbing the cached dir
	if (!first.empty() && !last.empty())
	{
		// some platforms have case-sensitive filesystems, so be
		// utterly consistent with our firstname/lastname case.
		std::string firstlower(first);
		LLStringUtil::toLower(firstlower);
		std::string lastlower(last);
		LLStringUtil::toLower(lastlower);
		mLindenUserDir = getOSUserAppDir();
		mLindenUserDir += mDirDelimiter;
		mLindenUserDir += firstlower;
		mLindenUserDir += "_";
		mLindenUserDir += lastlower;
	}
	else
	{
		llerrs << "Invalid name for LLDir::setLindenUserDir" << llendl;
	}

	dumpCurrentDirectories();	
}