ensure prefixes end with '/'
This commit is contained in:
parent
a934d8f867
commit
9b7b6054ee
11
package.cpp
11
package.cpp
@ -521,6 +521,17 @@ void Package::setContentsPrefixPaths(const QStringList &prefixPaths)
|
||||
d->contentsPrefixPaths = prefixPaths;
|
||||
if (d->contentsPrefixPaths.isEmpty()) {
|
||||
d->contentsPrefixPaths << QString();
|
||||
} else {
|
||||
// the code assumes that the prefixes have a trailing slash
|
||||
// so let's make that true here
|
||||
QMutableStringListIterator it(d->contentsPrefixPaths);
|
||||
while (it.hasNext()) {
|
||||
it.next();
|
||||
|
||||
if (!it.value().endsWith('/')) {
|
||||
it.setValue(it.value() % '/');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user