make sure that the mount path only gets appended if the mount worked

This commit is contained in:
Andreas Zweili 2019-02-04 16:23:48 +01:00
parent 1a1aa5dee8
commit d8e2129b47
1 changed files with 1 additions and 1 deletions

View File

@ -203,9 +203,9 @@ class MainWindow(QMainWindow):
mount_path = os.path.join('/tmp/', archive_name)
create_path(mount_path)
if os.access(mount_path, os.W_OK):
self.mount_paths.append(mount_path)
try:
borg.mount(archive_name, mount_path)
self.mount_paths.append(mount_path)
open_path(mount_path)
except BorgException as e:
show_error(e)