diff options
-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): |