无备份分区时,需要可以备份到U盘,故改造备份到U盘的逻辑
This commit is contained in:
parent
7e5c48b638
commit
b0d1f5f7d5
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue