mirror of https://github.com/borgbase/vorta
Refuse to add inaccessible folders, warn on inaccessible files during backup (#951)
* Refuse to add inaccessible folders * Warn when Borg returns a warning (e.g. for inaccessible files)
This commit is contained in:
parent
3b57ab43a4
commit
0e91775091
|
@ -32,7 +32,10 @@ class BorgCreateThread(BorgThread):
|
|||
repo.total_unique_chunks = stats['total_unique_chunks']
|
||||
repo.save()
|
||||
|
||||
self.app.backup_progress_event.emit(self.tr('Backup finished.'))
|
||||
if result['returncode'] == 1:
|
||||
self.app.backup_progress_event.emit(self.tr('Backup finished with warnings. See logs for details.'))
|
||||
else:
|
||||
self.app.backup_progress_event.emit(self.tr('Backup finished.'))
|
||||
|
||||
def progress_event(self, fmt):
|
||||
self.app.backup_progress_event.emit(fmt)
|
||||
|
|
|
@ -157,6 +157,12 @@ class SourceTab(SourceBase, SourceUI, BackupProfileMixin):
|
|||
def receive():
|
||||
dirs = dialog.selectedFiles()
|
||||
for dir in dirs:
|
||||
if not os.access(dir, os.R_OK):
|
||||
msg = QMessageBox()
|
||||
msg.setText(self.tr(f"You don't have read access to {dir}."))
|
||||
msg.exec()
|
||||
return
|
||||
|
||||
new_source, created = SourceFileModel.get_or_create(dir=dir, profile=self.profile())
|
||||
if created:
|
||||
self.add_source_to_table(new_source)
|
||||
|
|
Loading…
Reference in New Issue