fix: explicitly set scheme for local file in -I argument
Otherwise isLocalFile() will return false for local files without the file:// thingy. Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
parent
f3279a0697
commit
3cc987a5b4
@ -1817,6 +1817,10 @@ void MainWindow::droppedURLs(QList<QUrl> urls)
|
|||||||
{
|
{
|
||||||
// NOTE: This loop only processes one dropped file!
|
// NOTE: This loop only processes one dropped file!
|
||||||
for (auto& url : urls) {
|
for (auto& url : urls) {
|
||||||
|
// The isLocalFile() check below doesn't work as intended without an explicit scheme.
|
||||||
|
if (url.scheme().isEmpty())
|
||||||
|
url.setScheme("file");
|
||||||
|
|
||||||
if (!url.isLocalFile()) { // probably instance/modpack
|
if (!url.isLocalFile()) { // probably instance/modpack
|
||||||
addInstance(url.toString());
|
addInstance(url.toString());
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user