Merge pull request #2635 from thoys/windows-script-path-fix

Fixed loading local stored scripts on Windows machines
This commit is contained in:
Clément Brisset 2014-04-10 16:40:47 -07:00
commit 5f6dee6c64

View file

@ -95,8 +95,9 @@ ScriptEngine::ScriptEngine(const QUrl& scriptURL,
QUrl url(scriptURL);
// if the scheme is empty, maybe they typed in a file, let's try
if (url.scheme().isEmpty()) {
// if the scheme length is one or lower, maybe they typed in a file, let's try
const int WINDOWS_DRIVE_LETTER_SIZE = 1;
if (url.scheme().size() <= WINDOWS_DRIVE_LETTER_SIZE) {
url = QUrl::fromLocalFile(scriptURLString);
}