mirror of
https://github.com/overte-org/overte.git
synced 2025-04-24 03:33:35 +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;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue