diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2022-06-10 17:30:16 +0200 |
---|---|---|
committer | Jörg Bornemann <joerg.bornemann@qt.io> | 2022-07-07 11:51:02 +0000 |
commit | 4635d90158bfd3b4381b38604cfce0c5ac2a56e7 (patch) | |
tree | 397aedc5f6c9219721c2347f914c22b92a2c9432 /src | |
parent | 86841bf32ad06f1eddcc808da564dc0e67431a9a (diff) |
Fix wildcards in absolute path dependencies
The expandWildcards function assumed that every passed path is relative
and unconditionally prepended dirPath.
Fixes: QTCREATORBUG-27645
Change-Id: I9759e3885cc3d4890a06093b6f80974fdcefc086
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/jomlib/parser.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/jomlib/parser.cpp b/src/jomlib/parser.cpp index b7b5353..a33a550 100644 --- a/src/jomlib/parser.cpp +++ b/src/jomlib/parser.cpp @@ -360,7 +360,10 @@ static QStringList expandWildcards(const QString &dirPath, const QStringList &ls str = QDir::fromNativeSeparators(str); int idx = str.lastIndexOf(QLatin1Char('/')); if (idx != -1) { - path += QLatin1Char('/') + str.left(idx); + if (QFileInfo(str).isRelative()) + path += QLatin1Char('/') + str.left(idx); + else + path = str.left(idx); str.remove(0, idx + 1); } |