From 101885ffe4efbd6154b7c99b27776f6bbb30706f Mon Sep 17 00:00:00 2001 From: Albert S Date: Sun, 4 Oct 2020 19:46:35 +0200 Subject: [PATCH] window: addToFavourites(): Save non-system entries in their originating path --- window.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/window.cpp b/window.cpp index a5b4c56..a728f53 100644 --- a/window.cpp +++ b/window.cpp @@ -134,7 +134,16 @@ void Window::addToFavourites(const EntryConfig &config) userConfig.inherit = config.entryPath; QFileInfo fi{config.entryPath}; QString entryName = fi.completeBaseName() + ".qsrun"; - userConfig.entryPath = this->settingsProvider->userEntriesPaths()[0] + "/" + entryName; + QString entryPath; + if(config.type == EntryType::SYSTEM) + { + entryPath = this->settingsProvider->userEntriesPaths()[0] + "/" + entryName; + } + else + { + entryPath = fi.absoluteDir().absoluteFilePath(entryName); + } + userConfig.entryPath = entryPath; try { entryProvider->saveUserEntry(userConfig);