Changeset - 8dba1176b5c0
[Not reviewed]
0 1 0
HanzZ - 13 years ago 2012-03-10 11:31:13
hanzz.k@gmail.com
Remove skype tmp directory before login
1 file changed with 6 insertions and 0 deletions:
0 comments (0 inline, 0 general)
backends/skype/main.cpp
Show inline comments
 
@@ -383,12 +383,18 @@ bool Skype::createDBusProxy() {
 
static gboolean create_dbus_proxy(gpointer data) {
 
	Skype *skype = (Skype *) data;
 
	return skype->createDBusProxy();
 
}
 

	
 
void Skype::login() {
 
	if (m_username.find("..") == 0 || m_username.find("/") != std::string::npos) {
 
		np->handleDisconnected(m_user, 0, "Invalid username");
 
		return;
 
	}
 
	boost::filesystem::remove_all(std::string("/tmp/skype/") + m_username);
 

	
 
	boost::filesystem::path	path(std::string("/tmp/skype/") + m_username);
 
	if (!boost::filesystem::exists(path)) {
 
		boost::filesystem::create_directories(path);
 
		boost::filesystem::path	path2(std::string("/tmp/skype/") + m_username + "/" + m_username );
 
		boost::filesystem::create_directories(path2);
 
	}
0 comments (0 inline, 0 general)