Skip to content

Commit

Permalink
JobsTabWidget: warn about invalid paths
Browse files Browse the repository at this point in the history
  • Loading branch information
gperciva committed Oct 24, 2023
1 parent f6f90fe commit d0c40eb
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/widgets/jobstabwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -398,14 +398,18 @@ void JobsTabWidget::backupJob(const JobPtr &job)
}
else
{
// Construct a string with the missing paths.
QString missing;
for(const QUrl &url : job->invalidUrls())
missing += url.path() + "\n";
// Warn & bail if any paths are no longer valid.
QMessageBox::StandardButton confirm = QMessageBox::question(
this, tr("Job warning"),
tr("Some backup paths for Job %1 are not"
" accessible anymore and thus backup may"
" be incomplete."
" Proceed with backup?")
.arg(job->name()));
tr("Job %1 contains paths that are not accessible:\n"
"%2\n"
"The backup will be incomplete. Proceed with backup?")
.arg(job->name())
.arg(missing));
if(confirm != QMessageBox::Yes)
return;
}
Expand Down

0 comments on commit d0c40eb

Please sign in to comment.