Commit 6deb1236 authored by Christian Loose's avatar Christian Loose
Browse files

In version 1.11.1 of cvs the format of the .cvspass file changed

from:
user@host:/path Acleartext_password
to:
/1 user@host:port/path Aencoded_password

This patch adds support for the new format.

svn path=/trunk/kdesdk/cervisia/; revision=190923
parent 542edecf
......@@ -23,6 +23,12 @@
#include "cervisiapart.h"
// old .cvspass format:
// user@host:/path Acleartext_password
//
// new .cvspass format (since cvs 1.11.1):
// /1 user@host:port/path Aencoded_password
//
QStringList Repositories::readCvsPassFile()
{
QStringList list;
......@@ -36,7 +42,12 @@ QStringList Repositories::readCvsPassFile()
int pos;
QString line = stream.readLine();
if ( (pos = line.find(' ')) != -1)
list.append(line.left(pos));
{
if (line[0] != '/') // old format
list.append(line.left(pos));
else // new format
list.append(line.section(' ', 1, 1));
}
}
f.close();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment