Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 1 file). Show all
Unified · Split
| @@ -1172,7 +1172,8 @@ void ScriptEngine::include(const QStringList& includeFiles, QScriptValue callbac · 1171 unmodified lines | ||
| 1172 | 1172 | // Guard against meaningless query and fragment parts. |
| 1173 | 1173 | // Do NOT use PreferLocalFile as its behavior is unpredictable (e.g., on defaultScriptsLocation()) |
| 1174 | 1174 | const auto strippingFlags = QUrl::RemoveFilename | QUrl::RemoveQuery | QUrl::RemoveFragment; |
| 1175 | − for (QString file : includeFiles) { | |
| 1175 | + for (QString includeFile : includeFiles) { | |
| 1176 | + QString file = ResourceManager::normalizeURL(includeFile); | |
| 1176 | 1177 | QUrl thisURL; |
| 1177 | 1178 | bool isStandardLibrary = false; |
| 1178 | 1179 | if (file.startsWith("/~/")) { |
| @@ -1187,8 +1188,6 @@ void ScriptEngine::include(const QStringList& includeFiles, QScriptValue callbac · 8 unmodified lines | ||
| 1187 | 1188 | thisURL = resolvePath(file); |
| 1188 | 1189 | } |
| 1189 | 1190 | |
| 1190 | − thisURL = expandScriptUrl(normalizeScriptURL(ResourceManager::normalizeURL(thisURL))); | |
| 1191 | − | |
| 1192 | 1191 | if (!_includedURLs.contains(thisURL)) { |
| 1193 | 1192 | if (!isStandardLibrary && !currentSandboxURL.isEmpty() && (thisURL.scheme() == "file") && |
| 1194 | 1193 | (currentSandboxURL.scheme() != "file" || |