Ejemplo n.º 1
0
void LLDir::setLindenUserDir(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);
		mLindenUserDir = getOSUserAppDir();
		mLindenUserDir += mDirDelimiter;
		mLindenUserDir += firstlower;
		mLindenUserDir += "_";
		mLindenUserDir += lastlower;
		
		if (!grid.empty())
		{
			std::string gridlower(grid);
			LLStringUtil::toLower(gridlower);
			mLindenUserDir += "@";
			mLindenUserDir += gridlower;
		}		
	}
	else
	{
		llerrs << "Invalid name for LLDir::setLindenUserDir" << llendl;
	}

	dumpCurrentDirectories();	
}
Ejemplo n.º 2
0
void LLDir::setLindenUserDir(const std::string &username, const std::string &gridnick)
{
	// if the username isn't set, that's bad
	if (!username.empty())
	{
		// some platforms have case-sensitive filesystems, so be
		// utterly consistent with our firstname/lastname case.
		std::string userlower(username);
		LLStringUtil::toLower(userlower);
		LLStringUtil::replaceChar(userlower, ' ', '_');
		mLindenUserDir = getOSUserAppDir();
		mLindenUserDir += mDirDelimiter;
		mLindenUserDir += userlower;
		if(gridnick != "agni" && gridnick != "aditi")
		{
			mLindenUserDir += "_";
			mLindenUserDir += gridnick;
		}
	}
	else
	{
		llerrs << "NULL name for LLDir::setLindenUserDir" << llendl;
	}

	dumpCurrentDirectories();	
}