diff --git a/src/vorta/utils.py b/src/vorta/utils.py index eed253f9..a13b6752 100644 --- a/src/vorta/utils.py +++ b/src/vorta/utils.py @@ -59,6 +59,7 @@ def choose_folder_dialog(parent, title): options = QFileDialog.Options() options |= QFileDialog.ShowDirsOnly dialog = QFileDialog(parent, title, os.path.expanduser('~'), options=options) + dialog.setFileMode(QFileDialog.Directory) dialog.setParent(parent, QtCore.Qt.Sheet) return dialog diff --git a/src/vorta/views/snapshots_tab.py b/src/vorta/views/snapshots_tab.py index 9c144224..48cc3cc2 100644 --- a/src/vorta/views/snapshots_tab.py +++ b/src/vorta/views/snapshots_tab.py @@ -1,7 +1,7 @@ from datetime import timedelta import copy from PyQt5 import uic -from PyQt5.QtWidgets import QFileDialog, QTableWidgetItem, QTableView, QHeaderView +from PyQt5.QtWidgets import QTableWidgetItem, QTableView, QHeaderView from vorta.borg.prune import BorgPruneThread from vorta.borg.list import BorgListThread @@ -139,7 +139,7 @@ class SnapshotTab(SnapshotBase, SnapshotUI, BackupProfileMixin): def receive(): dir = dialog.selectedFiles() if dir: - params['cmd'].append(dir) + params['cmd'].append(dir[0]) if params['ok']: self._toggle_all_buttons(False) thread = BorgMountThread(params['cmd'], params, parent=self) diff --git a/src/vorta/views/source_tab.py b/src/vorta/views/source_tab.py index 7224a38a..af340aa5 100644 --- a/src/vorta/views/source_tab.py +++ b/src/vorta/views/source_tab.py @@ -1,5 +1,4 @@ from PyQt5 import uic, QtGui -from PyQt5.QtWidgets import QFileDialog from ..models import SourceDirModel, BackupProfileMixin from ..utils import get_asset, choose_folder_dialog