mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:24:00 +02:00
switch to apply normalizeURL only and move to top of for loop
This commit is contained in:
parent
d749f243c6
commit
28eadc149f
1 changed files with 2 additions and 3 deletions
|
@ -1172,7 +1172,8 @@ void ScriptEngine::include(const QStringList& includeFiles, QScriptValue callbac
|
|||
// Guard against meaningless query and fragment parts.
|
||||
// Do NOT use PreferLocalFile as its behavior is unpredictable (e.g., on defaultScriptsLocation())
|
||||
const auto strippingFlags = QUrl::RemoveFilename | QUrl::RemoveQuery | QUrl::RemoveFragment;
|
||||
for (QString file : includeFiles) {
|
||||
for (QString includeFile : includeFiles) {
|
||||
QString file = ResourceManager::normalizeURL(includeFile);
|
||||
QUrl thisURL;
|
||||
bool isStandardLibrary = false;
|
||||
if (file.startsWith("/~/")) {
|
||||
|
@ -1187,8 +1188,6 @@ void ScriptEngine::include(const QStringList& includeFiles, QScriptValue callbac
|
|||
thisURL = resolvePath(file);
|
||||
}
|
||||
|
||||
thisURL = expandScriptUrl(normalizeScriptURL(ResourceManager::normalizeURL(thisURL)));
|
||||
|
||||
if (!_includedURLs.contains(thisURL)) {
|
||||
if (!isStandardLibrary && !currentSandboxURL.isEmpty() && (thisURL.scheme() == "file") &&
|
||||
(currentSandboxURL.scheme() != "file" ||
|
||||
|
|
Loading…
Reference in a new issue