Skip to content

Commit

Permalink
Use full canonical path to installed plugins
Browse files Browse the repository at this point in the history
Resolves symlinks which may be used for the plugin folder, e.g. by
plugin developers who symlink a development folder into their profile's
plugin folder path.

Makes it a bit easier for plugin developers to see whether a plugin
is pointing to a local development path or a plugin installed through
the repo.
  • Loading branch information
nyalldawson committed Aug 6, 2020
1 parent 97915e3 commit b02c5c0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/app/pluginmanager/qgspluginmanager.cpp
Expand Up @@ -1006,11 +1006,15 @@ void QgsPluginManager::showPluginDetails( QStandardItem *item )
QString localDir = metadata->value( QStringLiteral( "library" ) );
if ( QFileInfo( localDir ).isFile() )
{
localDir = QFileInfo( localDir ).absolutePath();
localDir = QFileInfo( localDir ).canonicalFilePath();
}
else
{
localDir = QDir( localDir ).canonicalPath();
}
html += QStringLiteral( "<tr><td class='key'>%1 </td><td title='%2'><a href='%3'>%4</a></td></tr>"
).arg( tr( "Installed version" ),
metadata->value( QStringLiteral( "library" ) ),
QDir::toNativeSeparators( localDir ),
QUrl::fromLocalFile( localDir ).toString(),
ver );
}
Expand Down

0 comments on commit b02c5c0

Please sign in to comment.