mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:23:54 +02:00
Correct usage of the test script URL.
This commit is contained in:
parent
1f691edf0d
commit
aef5ea0936
1 changed files with 6 additions and 1 deletions
|
@ -1022,7 +1022,12 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
|||
for (int i = 0; i < args.size() - 1; ++i) {
|
||||
if (args.at(i) == TEST_SCRIPT && (i + 1) < args.size()) {
|
||||
QString testScriptPath = args.at(i + 1);
|
||||
if (QFileInfo(testScriptPath).exists()) {
|
||||
|
||||
// If the URL scheme is "http(s)" then use as is, else - treat it as a local file
|
||||
// This is done so as not break previous command line scripts
|
||||
if (testScriptPath.left(4) == "http") {
|
||||
setProperty(hifi::properties::TEST, QUrl::fromUserInput(testScriptPath));
|
||||
} else if (QFileInfo(testScriptPath).exists()) {
|
||||
setProperty(hifi::properties::TEST, QUrl::fromLocalFile(testScriptPath));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue