forked from qt-creator/qt-creator
Terminal: Correctly parse url links with empty path
Previously urls such as http://google.com were appended to the current dir, as FilePath::isAbsolute would return false since there is no path. Change-Id: I17546aed322a74f6b8cbcc166d37608fd809fd1e Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -1362,7 +1362,7 @@ bool TerminalWidget::checkLinkAt(const QPoint &pos)
|
||||
|
||||
Link link = Link::fromString(t, true);
|
||||
|
||||
if (!link.targetFilePath.isAbsolutePath())
|
||||
if (!link.targetFilePath.isEmpty() && !link.targetFilePath.isAbsolutePath())
|
||||
link.targetFilePath = m_cwd.pathAppended(link.targetFilePath.path());
|
||||
|
||||
if (link.hasValidTarget()
|
||||
|
||||
Reference in New Issue
Block a user