File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments