mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 09:25:31 +02:00
Merge pull request #7119 from sethalves/fix-linux-local-scriptnames
filenames on Linux are case-sensitive
This commit is contained in:
commit
80aee563fc
1 changed files with 8 additions and 1 deletions
|
@ -42,13 +42,20 @@ ScriptEngines::ScriptEngines()
|
|||
}
|
||||
|
||||
QString normalizeScriptUrl(const QString& rawScriptUrl) {
|
||||
auto lower = rawScriptUrl.toLower();
|
||||
if (!rawScriptUrl.startsWith("http:") && !rawScriptUrl.startsWith("https:") && !rawScriptUrl.startsWith("atp:")) {
|
||||
#ifdef Q_OS_LINUX
|
||||
if (rawScriptUrl.startsWith("file:")) {
|
||||
return rawScriptUrl;
|
||||
}
|
||||
return QUrl::fromLocalFile(rawScriptUrl).toString();
|
||||
#else
|
||||
if (rawScriptUrl.startsWith("file:")) {
|
||||
return rawScriptUrl.toLower();
|
||||
}
|
||||
// Force lowercase on file scripts because of drive letter weirdness.
|
||||
return QUrl::fromLocalFile(rawScriptUrl).toString().toLower();
|
||||
#endif
|
||||
|
||||
}
|
||||
return QUrl(rawScriptUrl).toString();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue