Skip to content

Commit

Permalink
Accept file URIs as files to open
Browse files Browse the repository at this point in the history
  • Loading branch information
dail8859 committed Sep 28, 2023
1 parent 820201b commit 99e8bfe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/NotepadNext/NotepadNextApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,9 @@ void NotepadNextApplication::openFiles(const QStringList &files)
qInfo(Q_FUNC_INFO);

for (const QString &file : files) {
window->openFile(file);
QUrl fileUrl(file);
QString filePath = fileUrl.isValid() && fileUrl.isLocalFile() ? fileUrl.toLocalFile() : file;
window->openFile(filePath);
}
}

Expand Down

0 comments on commit 99e8bfe

Please sign in to comment.