mirror of
https://github.com/JulianGro/overte.git
synced 2025-08-04 09:25:11 +02:00
use endsWith for scriptURL check
This commit is contained in:
parent
43967dc9a6
commit
11aafc0f48
1 changed files with 4 additions and 1 deletions
|
@ -4827,7 +4827,10 @@ bool Application::askToLoadScript(const QString& scriptFilenameOrURL) {
|
||||||
QMessageBox::StandardButton reply;
|
QMessageBox::StandardButton reply;
|
||||||
|
|
||||||
QString shortName = scriptFilenameOrURL;
|
QString shortName = scriptFilenameOrURL;
|
||||||
if (shortName.contains(MARKETPLACE_CDN_HOSTNAME)) {
|
|
||||||
|
QUrl scriptURL { scriptFilenameOrURL };
|
||||||
|
|
||||||
|
if (scriptURL.host().endsWith(MARKETPLACE_CDN_HOSTNAME)) {
|
||||||
shortName = shortName.mid(shortName.lastIndexOf('/') + 1);
|
shortName = shortName.mid(shortName.lastIndexOf('/') + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue