Fixed loading local stored scripts on Windows machines

This commit is contained in:
Thijs Wenker 2014-04-09 23:44:40 +02:00
parent 973fb95c9d
commit 5d812c8cb2

View file

@ -92,8 +92,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 DWORD WINDOWS_DRIVE_LETTER_SIZE = 1;
if (url.scheme().size() <= WINDOWS_DRIVE_LETTER_SIZE) {
url = QUrl::fromLocalFile(scriptURLString);
}