Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/vorta/filedialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,21 @@ def __init__(self, parent=None, window_title='Vorta File Dialog', title='Select
def selected_paths(self):
indexes = self.tree.selectionModel().selectedIndexes()
paths = []

# If no tree selection, use the path bar text as the selection
if not indexes:
path = self.path_bar.text()
if path and os.path.exists(path):
if not os.access(path, os.R_OK):
msg = QMessageBox()
msg.setIcon(QMessageBox.Icon.Warning)
msg.setWindowTitle(self.tr("Permission Denied"))
msg.setText(self.tr(f"You don't have read access to {path}."))
msg.exec()
return []
return [path]
return []

for index in indexes:
if index.column() == 0:
path = self.model.filePath(index)
Expand Down
Loading