mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
Backup dialog: check if the backup file already exists.
Give the user a chance to cancel the backup if the selected file already exists. Since the filename is automatically generated from the installation version information this can happen when trying to create a second backup of the installation. Change-Id: Iee34e576c4b3b94a4ccf99836741806b52a8affd
This commit is contained in:
parent
6db53f4ef8
commit
bed847a655
1 changed files with 7 additions and 0 deletions
|
|
@ -108,6 +108,13 @@ void BackupDialog::updateSizeInfo(void)
|
|||
|
||||
void BackupDialog::backup(void)
|
||||
{
|
||||
if(QFileInfo(m_backupName).isFile()) {
|
||||
if(QMessageBox::warning(this, tr("File exists"),
|
||||
tr("The selected backup file already exists. Overwrite?"),
|
||||
QMessageBox::Yes | QMessageBox::No) == QMessageBox::No) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
m_logger = new ProgressLoggerGui(this);
|
||||
connect(m_logger, SIGNAL(closed()), this, SLOT(close()));
|
||||
m_logger->show();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue