Skip to content

Commit 4d7bf67

Browse files
author
Oleg Kozhukharenko
committed
Merge pull request 'Fix bug 73688' (#367) from fix/bug-73688 into develop
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/desktop-apps/pulls/367
2 parents b12dd7b + ce6d539 commit 4d7bf67

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

win-linux/src/cascapplicationmanagerwrapper.cpp

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -969,13 +969,23 @@ void CAscApplicationManagerWrapper::handleInputCmd(const std::vector<wstring>& v
969969

970970
if (open_opts.srctype == AscEditorType::etUndefined) {
971971
QString str_url = QString::fromStdWString(open_opts.wurl);
972-
#ifdef _WIN32
973972
if ( CFileInspector::isLocalFile(str_url) ) {
973+
#ifdef _WIN32
974974
str_url = Utils::replaceBackslash(str_url);
975975
open_opts.wurl = str_url.toStdWString();
976-
}
976+
#else
977+
QUrl url = QUrl::fromUserInput(str_url);
978+
if (!url.isValid()) {
979+
QFileInfo info(str_url);
980+
if (info.isFile())
981+
url = QUrl::fromUserInput(info.absoluteFilePath());
982+
}
983+
if (url.isValid()) {
984+
str_url = url.toLocalFile();
985+
open_opts.wurl = str_url.toStdWString();
986+
}
977987
#endif
978-
988+
}
979989
if ( _app.m_private->bringEditorToFront(str_url) ) {
980990
continue;
981991
} else

0 commit comments

Comments
 (0)