fix malformed urls on windows (like file:///Users/ai/AppData....)

note: the issue happened because drive letter on Windows is treated by QUrl as 'scheme', so replacing it with 'file' results in broken url.
This commit is contained in:
Alexander Ivash 2018-03-16 00:27:36 +03:00
parent a7dc2cd12e
commit b1690b3189

View file

@ -28,7 +28,7 @@ void BakerCLI::bakeFile(QUrl inputUrl, const QString& outputPath, const QString&
// if the URL doesn't have a scheme, assume it is a local file
if (inputUrl.scheme() != "http" && inputUrl.scheme() != "https" && inputUrl.scheme() != "ftp") {
inputUrl.setScheme("file");
inputUrl = QUrl::fromLocalFile(inputUrl.toString());
}
qDebug() << "Baking file type: " << type;