aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Manuel Santamaría Lema <panfaust@gmail.com>2010-06-21 16:07:47 +0200
committerJosé Manuel Santamaría Lema <panfaust@gmail.com>2010-06-21 16:07:47 +0200
commit9bdc2a66b057099a7bca628f26de87d2b4b55400 (patch)
treedc9476d938c82dbe17a7d7bcb6362e03c3433139
parent209e6ce4ddf114494d6d72455690af819dcbf18c (diff)
downloadsvn2git-9bdc2a66b057099a7bca628f26de87d2b4b55400.tar
svn2git-9bdc2a66b057099a7bca628f26de87d2b4b55400.tar.gz
svn2git-9bdc2a66b057099a7bca628f26de87d2b4b55400.tar.bz2
svn2git-9bdc2a66b057099a7bca628f26de87d2b4b55400.tar.xz
svn2git-9bdc2a66b057099a7bca628f26de87d2b4b55400.zip
Allow comments (start with '#') in accounts map
-rw-r--r--src/main.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index a00c6dc..0edf8f5 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -41,7 +41,11 @@ QHash<QByteArray, QByteArray> loadIdentityMapFile(const QString &fileName)
}
while (!file.atEnd()) {
- QByteArray line = file.readLine().trimmed();
+ QByteArray line = file.readLine();
+ int comment_pos = line.indexOf('#');
+ if (comment_pos != -1)
+ line.truncate(comment_pos);
+ line = line.trimmed();
int space = line.indexOf(' ');
if (space == -1)
continue; // invalid line