diff options
author | Papoteur <papoteur@mageia.org> | 2024-02-08 19:58:35 +0100 |
---|---|---|
committer | Papoteur <papoteur@mageia.org> | 2024-02-08 19:58:35 +0100 |
commit | aaa11685c8a90a6802adf903d35b8ce22dfd41bd (patch) | |
tree | e89df91412eba0ae45844a4806536b75fa7913d7 | |
parent | c4c331684bfdcf845b3031626d345d3043a261ce (diff) | |
download | mga-advisor-aaa11685c8a90a6802adf903d35b8ce22dfd41bd.tar mga-advisor-aaa11685c8a90a6802adf903d35b8ce22dfd41bd.tar.gz mga-advisor-aaa11685c8a90a6802adf903d35b8ce22dfd41bd.tar.bz2 mga-advisor-aaa11685c8a90a6802adf903d35b8ce22dfd41bd.tar.xz mga-advisor-aaa11685c8a90a6802adf903d35b8ce22dfd41bd.zip |
Remove home path from path in settings
-rw-r--r-- | mga-advisor.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mga-advisor.py b/mga-advisor.py index c552fb0..0c3d07f 100644 --- a/mga-advisor.py +++ b/mga-advisor.py @@ -260,7 +260,7 @@ class Widget(QWidget): default_path = self.settings.value("Default/path", "/mageia-advisories/advisories") if QDir().mkpath(QDir().homePath() + default_path): if self.ui.bug_le.text() != "": - filename = os.path.join(QDir().homePath(), default_path, f"{self.ui.bug_le.text()}.adv") + filename = os.path.join(QDir().homePath()+ default_path, f"{self.ui.bug_le.text()}.adv") if os.path.exists(filename): response = QMessageBox.question(self, 'File exists', f'The file {filename} already exists. Do you want to override it ?', QMessageBox.Yes | QMessageBox.No) if response == QMessageBox.No: @@ -272,6 +272,7 @@ class Widget(QWidget): def select_path(self): filepath = QFileDialog.getExistingDirectory(self, "Select default directory for advisories repository", self.settings.value("Default/path")) if filepath: + filepath = filepath[len(QDir().homePath()):] self.settings.setValue('Default/path', filepath) def cancel(self): |