From 1003397079060115f559843aded6e2ca96efb711 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=B0=91=E5=8B=87?= Date: Thu, 15 Sep 2022 11:17:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=A4=87=E4=BB=BD=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=E9=80=89=E6=8B=A9=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kybackup/module/databackup.cpp | 7 +++++-- kybackup/module/systembackup.cpp | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/kybackup/module/databackup.cpp b/kybackup/module/databackup.cpp index abb5ba9..7486636 100755 --- a/kybackup/module/databackup.cpp +++ b/kybackup/module/databackup.cpp @@ -500,7 +500,10 @@ void DataBackup::initSecondWidget() } } - if (this->m_udiskPaths.contains(fileName)) { + if (GlobelBackupInfo::inst().hasBackupPartition() && fileName == Utils::getSysRootPath()) { + comboSelect->setCurrentIndex(0); + this->m_customizePath = ""; + } else if (this->m_udiskPaths.contains(fileName)) { comboSelect->setCurrentIndex(this->m_udiskPaths.indexOf(fileName)); this->m_customizePath = ""; } else { @@ -509,7 +512,7 @@ void DataBackup::initSecondWidget() QLineEdit * edit = new QLineEdit; comboSelect->setLineEdit(edit); - edit->setText(tr("customize path : ") + fileName + BACKUP_SNAPSHOTS_PATH); + edit->setText(tr("customize path : ") + QString(fileName + BACKUP_SNAPSHOTS_PATH).replace("//", "/")); edit->setReadOnly(true); if (listWidget->getBackupPaths().size() > 0) nextStep->setEnabled(true); diff --git a/kybackup/module/systembackup.cpp b/kybackup/module/systembackup.cpp index 477c178..e9f3e17 100755 --- a/kybackup/module/systembackup.cpp +++ b/kybackup/module/systembackup.cpp @@ -356,7 +356,10 @@ void SystemBackup::initSecondWidget() } } - if (this->m_udiskPaths.contains(fileName)) { + if (GlobelBackupInfo::inst().hasBackupPartition() && fileName == Utils::getSysRootPath()) { + comboSelect->setCurrentIndex(0); + this->m_customizePath = ""; + } else if (this->m_udiskPaths.contains(fileName)) { comboSelect->setCurrentIndex(this->m_udiskPaths.indexOf(fileName)); this->m_customizePath = ""; } else { @@ -365,7 +368,7 @@ void SystemBackup::initSecondWidget() QLineEdit * edit = new QLineEdit; comboSelect->setLineEdit(edit); - edit->setText(tr("customize path : ") + fileName + BACKUP_SNAPSHOTS_PATH); + edit->setText(tr("customize path : ") + QString(fileName + BACKUP_SNAPSHOTS_PATH).replace("//", "/")); edit->setReadOnly(true); nextStep->setEnabled(true); }