Android: Make checking a dependency path accept both separator styles
The path of dependencies (.so, .jar, etc.) might use either native or
non-native dir separators. Let's support both cases.
Amends: 4e94465096
Task-number: QTBUG-87066
Change-Id: I8ce3235db5bab8c4c139f841d3a2fe74d3c7c7f2
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
parent
8d057fea98
commit
c3b0828e3b
@ -2170,13 +2170,13 @@ bool copyQtFiles(Options *options)
|
||||
|
||||
if (qtDependency.relativePath.endsWith(QLatin1String(".so"))) {
|
||||
QString garbledFileName;
|
||||
if (qtDependency.relativePath.startsWith(QLatin1String("lib") + QDir::separator())) {
|
||||
if (QDir::fromNativeSeparators(qtDependency.relativePath).startsWith(QLatin1String("lib/"))) {
|
||||
garbledFileName = qtDependency.relativePath.mid(sizeof("lib/") - 1);
|
||||
} else {
|
||||
garbledFileName = qtDependency.relativePath.mid(qtDependency.relativePath.lastIndexOf(QLatin1Char('/')) + 1);
|
||||
}
|
||||
destinationFileName = libsDirectory + options->currentArchitecture + QLatin1Char('/') + garbledFileName;
|
||||
} else if (qtDependency.relativePath.startsWith(QLatin1String("jar") + QDir::separator())) {
|
||||
} else if (QDir::fromNativeSeparators(qtDependency.relativePath).startsWith(QLatin1String("jar/"))) {
|
||||
destinationFileName = libsDirectory + qtDependency.relativePath.mid(sizeof("jar/") - 1);
|
||||
} else {
|
||||
destinationFileName = assetsDestinationDirectory + qtDependency.relativePath;
|
||||
|
Loading…
Reference in New Issue
Block a user