fix: fix #700
fixed by properly converting from a file path and converting to native seperators. should have known naive handling of file path as a URL would come back to bite us cross platform. Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
parent
30b01ef053
commit
a4870d4834
@ -263,11 +263,11 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
|
||||
m_instanceIdToShowWindowOf = parser.value("show");
|
||||
|
||||
for (auto zip_path : parser.values("import")){
|
||||
m_zipsToImport.append(QUrl(zip_path));
|
||||
m_zipsToImport.append(QUrl::fromLocalFile(QFileInfo(zip_path).absoluteFilePath()));
|
||||
}
|
||||
|
||||
for (auto zip_path : parser.positionalArguments()){ // treat unspesified positional arguments as import urls
|
||||
m_zipsToImport.append(QUrl(zip_path));
|
||||
m_zipsToImport.append(QUrl::fromLocalFile(QFileInfo(zip_path).absoluteFilePath()));
|
||||
}
|
||||
|
||||
|
||||
@ -1065,7 +1065,7 @@ void Application::messageReceived(const QByteArray& message)
|
||||
qWarning() << "Received" << command << "message without a zip path/URL.";
|
||||
return;
|
||||
}
|
||||
m_mainWindow->processURLs({ QUrl(path) });
|
||||
m_mainWindow->processURLs({ QUrl::fromLocalFile(QFileInfo(path).absoluteFilePath()) });
|
||||
}
|
||||
else if(command == "launch")
|
||||
{
|
||||
|
@ -1827,7 +1827,7 @@ void MainWindow::processURLs(QList<QUrl> urls)
|
||||
break;
|
||||
}
|
||||
|
||||
auto localFileName = url.toLocalFile();
|
||||
auto localFileName = QDir::toNativeSeparators(url.toLocalFile()) ;
|
||||
QFileInfo localFileInfo(localFileName);
|
||||
|
||||
auto type = ResourceUtils::identify(localFileInfo);
|
||||
|
Loading…
Reference in New Issue
Block a user