Skip to content

Commit 9bd0d7a

Browse files
committed
strip trailing slash from the help path if necessary (fix #16156)
1 parent 0dc1257 commit 9bd0d7a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/gui/qgshelp.cpp

+9-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,15 @@ QUrl QgsHelp::helpUrl( const QString& key )
5353

5454
Q_FOREACH ( const QString& path, paths )
5555
{
56-
fullPath = path;
56+
if ( path.endsWith( "\\" ) || path.endsWith( "/" ) )
57+
{
58+
fullPath = path.left( path.size() - 1 );
59+
}
60+
else
61+
{
62+
fullPath = path;
63+
}
64+
5765
Q_FOREACH ( const QString& var, scope->variableNames() )
5866
{
5967
QRegularExpression rx( QStringLiteral( "(<!\\$\\$)*(\\$%1)" ).arg( var ) );

0 commit comments

Comments
 (0)