mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 17:24:24 +02:00
Merge pull request #2635 from thoys/windows-script-path-fix
Fixed loading local stored scripts on Windows machines
This commit is contained in:
commit
5f6dee6c64
1 changed files with 3 additions and 2 deletions
|
@ -95,8 +95,9 @@ ScriptEngine::ScriptEngine(const QUrl& scriptURL,
|
||||||
|
|
||||||
QUrl url(scriptURL);
|
QUrl url(scriptURL);
|
||||||
|
|
||||||
// if the scheme is empty, maybe they typed in a file, let's try
|
// if the scheme length is one or lower, maybe they typed in a file, let's try
|
||||||
if (url.scheme().isEmpty()) {
|
const int WINDOWS_DRIVE_LETTER_SIZE = 1;
|
||||||
|
if (url.scheme().size() <= WINDOWS_DRIVE_LETTER_SIZE) {
|
||||||
url = QUrl::fromLocalFile(scriptURLString);
|
url = QUrl::fromLocalFile(scriptURLString);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue