diff options
author | Thomas Zander <zander@kde.org> | 2009-10-20 18:13:23 +0200 |
---|---|---|
committer | Thomas Zander <zander@kde.org> | 2009-10-20 18:13:23 +0200 |
commit | fabffb639c76c13f6e5c772da0113a4a482dd61d (patch) | |
tree | b443035aea298740db4c378d9058d2e9244c88b5 /src | |
parent | 98f8e676bd3f356739b4a5e40906e5d72a0f4360 (diff) | |
download | svn2git-fabffb639c76c13f6e5c772da0113a4a482dd61d.tar svn2git-fabffb639c76c13f6e5c772da0113a4a482dd61d.tar.gz svn2git-fabffb639c76c13f6e5c772da0113a4a482dd61d.tar.bz2 svn2git-fabffb639c76c13f6e5c772da0113a4a482dd61d.tar.xz svn2git-fabffb639c76c13f6e5c772da0113a4a482dd61d.zip |
Make passing in a trailing slash not assert.
Diffstat (limited to 'src')
-rw-r--r-- | src/svn.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/svn.cpp b/src/svn.cpp index aff7191..3416efe 100644 --- a/src/svn.cpp +++ b/src/svn.cpp @@ -159,7 +159,10 @@ int SvnPrivate::youngestRevision() int SvnPrivate::openRepository(const QString &pathToRepository) { svn_repos_t *repos; - SVN_ERR(svn_repos_open(&repos, QFile::encodeName(pathToRepository), global_pool)); + QString path = pathToRepository; + while (path.endsWith('/')) // no trailing slash allowed + path = path.mid(0, path.length()-1); + SVN_ERR(svn_repos_open(&repos, QFile::encodeName(path), global_pool)); fs = svn_repos_fs(repos); return EXIT_SUCCESS; |