无备份分区时,需要可以备份到U盘,故改造备份到U盘的逻辑

This commit is contained in:
zhaominyong 2022-07-14 09:50:49 +08:00
parent 7e5c48b638
commit b0d1f5f7d5
2 changed files with 8 additions and 4 deletions

View File

@ -30,8 +30,10 @@ bool UDiskDataBackupProxy::checkEnvEx()
qDebug() << "UDiskDataBackupProxy::checkEnv invoke begin";
// 1、检查/backup分区是否挂载上(不管是本地磁盘还是u盘设备都得保证/backup挂载上); 若没挂载,挂载
// 后来支持无备份分区
MyMountProxy mountProxy;
if ( MountResult::MOUNTED != mountProxy.mountBackupPartition() ) {
MountResult mountStatus = mountProxy.mountBackupPartition();
if ( MountResult::MOUNTED != mountStatus && MountResult::CANNOT_GET_BACKUPUUID != mountStatus ) {
emit checkResult(int(BackupResult::BACKUP_PARTITION_MOUNT_FAIL));
return false;
}

View File

@ -50,10 +50,12 @@ bool UDiskSystemBackupProxy::checkEnvEx()
qDebug() << "UDiskSystemBackupProxy::checkEnv invoke begin";
// 1、检查/backup分区是否挂载上(不管是本地磁盘还是u盘设备都得保证/backup挂载上); 若没挂载,挂载
// 后来支持无备份分区
MyMountProxy mountProxy;
if ( MountResult::MOUNTED != mountProxy.mountBackupPartition() ) {
// emit checkResult(int(BackupResult::BACKUP_PARTITION_MOUNT_FAIL));
// return false;
MountResult mountStatus = mountProxy.mountBackupPartition();
if ( MountResult::MOUNTED != mountStatus && MountResult::CANNOT_GET_BACKUPUUID != mountStatus ) {
emit checkResult(int(BackupResult::BACKUP_PARTITION_MOUNT_FAIL));
return false;
}
QString backupPath(m_backupWrapper.m_prefixDestPath);