From 65413bbad29ea31ea0fab83bbe0f55a3befc5a11 Mon Sep 17 00:00:00 2001 From: Christian Hartmann Date: Tue, 5 Apr 2022 13:06:19 +0200 Subject: [PATCH] fix: service-menu-installer ignoring symlinks on un-install service-menu-installer ignores .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 --- .../contextmenu/servicemenuinstaller/servicemenuinstaller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/settings/contextmenu/servicemenuinstaller/servicemenuinstaller.cpp b/src/settings/contextmenu/servicemenuinstaller/servicemenuinstaller.cpp index 9a9610b5f..99aac8a63 100644 --- a/src/settings/contextmenu/servicemenuinstaller/servicemenuinstaller.cpp +++ b/src/settings/contextmenu/servicemenuinstaller/servicemenuinstaller.cpp @@ -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(); -- 2.47.3