History

Fixed loading local stored scripts on Windows machines

Thijs Wenker committed 12 years ago

Commit 5d812c81 parent 973fb951 file · +3 −2Browse files

Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 1 file). Show all

Unified · Split

libraries/script-engine/src/ScriptEngine.cpp+3−2
@@ -92,8 +92,9 @@ ScriptEngine::ScriptEngine(const QUrl& scriptURL, · 91 unmodified lines
92 92
93 QUrl url(scriptURL);93 QUrl url(scriptURL);
94 94
95 // if the scheme is empty, maybe they typed in a file, let's try95 // if the scheme length is one or lower, maybe they typed in a file, let's try
96 if (url.scheme().isEmpty()) {96 const DWORD WINDOWS_DRIVE_LETTER_SIZE = 1;
97 if (url.scheme().size() <= WINDOWS_DRIVE_LETTER_SIZE) {
97 url = QUrl::fromLocalFile(scriptURLString);98 url = QUrl::fromLocalFile(scriptURLString);
98 }99 }
99 100