diff options
author | David Boddie <dboddie@trolltech.com> | 2010-06-21 17:02:54 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2010-06-21 17:02:54 (GMT) |
commit | 84ce7cc25b925d493a048ce5b00290483cd974f4 (patch) | |
tree | 0f4e709ca90e9bf3e683668460734282f426089d /src/network/ssl/qsslcertificate.cpp | |
parent | a2a5a8c5e203fe9d55f9addba1533a30c6f2ba19 (diff) | |
parent | 32e532743dc6243612ade017e8c326ca0e7e0dec (diff) | |
download | Qt-84ce7cc25b925d493a048ce5b00290483cd974f4.zip Qt-84ce7cc25b925d493a048ce5b00290483cd974f4.tar.gz Qt-84ce7cc25b925d493a048ce5b00290483cd974f4.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7
Diffstat (limited to 'src/network/ssl/qsslcertificate.cpp')
-rw-r--r-- | src/network/ssl/qsslcertificate.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp index 31c5ed1..a3ea555 100644 --- a/src/network/ssl/qsslcertificate.cpp +++ b/src/network/ssl/qsslcertificate.cpp @@ -548,8 +548,13 @@ QList<QSslCertificate> QSslCertificate::fromPath(const QString &path, // chop off the first two characters from the glob'ed paths. int startIndex = 0; if (pathPrefix.trimmed().isEmpty()) { - startIndex = 2; - pathPrefix = QLatin1String("."); + if(path.startsWith(QLatin1Char('/'))) { + pathPrefix = path.left(path.indexOf(QRegExp(QLatin1String("[\\*\\?\\[]")))); + pathPrefix = path.left(path.lastIndexOf(QLatin1Char('/'))); + } else { + startIndex = 2; + pathPrefix = QLatin1String("."); + } } // The path is a file. |