]> cloud.milkyroute.net Git - dolphin.git/commitdiff
fix: service-menu-installer ignoring symlinks on un-install
authorChristian Hartmann <hartmann.christian@gmail.com>
Tue, 5 Apr 2022 11:06:19 +0000 (13:06 +0200)
committerChristian Hartmann <hartmann.christian@gmail.com>
Sat, 21 May 2022 06:21:08 +0000 (06:21 +0000)
service-menu-installer ignores <package-name>.tar.gz-dir/uninstall.sh
if this is actualy just a symbolic link to install.sh in the same directory
(hardlinks and copies work)

canonicalPath() is used to get the name of the file on disk and returns install.sh
in the case of a symbolic link. install.sh without any arguments is called instead
of uninstall.sh consequently and no de-installation takes place.

replace canonicalPath() with absolutePath() as used in the rest of source file

resolves:

BUG: 452289

src/settings/contextmenu/servicemenuinstaller/servicemenuinstaller.cpp

index 9a9610b5f2105287aec5d9e09b1a7e827b762ff4..99aac8a63aaf7f3505b29be33e65250f47fbcd84 100644 (file)
@@ -204,7 +204,7 @@ QString findRecursive(const QString &dir, const QString &basename)
 {
     QDirIterator it(dir, QStringList{basename}, QDir::Files, QDirIterator::Subdirectories);
     while (it.hasNext()) {
-        return QFileInfo(it.next()).canonicalFilePath();
+        return QFileInfo(it.next()).absoluteFilePath();
     }
 
     return QString();