出厂还原不再清理/home下的残留

This commit is contained in:
zhaominyong 2022-05-11 14:29:41 +08:00
parent a196e58c4f
commit 7e0424bd1a
1 changed files with 5 additions and 5 deletions

View File

@ -357,11 +357,11 @@ void SystemRestoreProxy::restoreSystem()
fileIfSync.replace("//", "/");
QFileInfo file(fileIfSync);
QDateTime beginTime = file.fileTime(QFileDevice::FileModificationTime);
if (Utils::isHuawei990() && FACTORY_BACKUP_UUID == m_curUuid && m_backupWrapper.m_type == BackupType::RESTORE_SYSTEM) {
// 出厂还原有的机器上删除/home/xxx有残留故在此再强制删除一下sudo rm -rf命令一遍还删除不了报错无法删除/home/xx/.config:目录非空,应该是删除后又自动生成了),多删除几次还不是非常干净,^_^
removeHome(Utils::getSysRootPath() + "/home");
removeHome(Utils::getSysRootPath() + "/data/home");
}
// if (Utils::isHuawei990() && FACTORY_BACKUP_UUID == m_curUuid && m_backupWrapper.m_type == BackupType::RESTORE_SYSTEM) {
// // 出厂还原有的机器上删除/home/xxx有残留故在此再强制删除一下sudo rm -rf命令一遍还删除不了报错无法删除/home/xx/.config:目录非空,应该是删除后又自动生成了),多删除几次还不是非常干净,^_^
// removeHome(Utils::getSysRootPath() + "/home");
// removeHome(Utils::getSysRootPath() + "/data/home");
// }
Utils::wait(10);
Utils::updateSyncFile();
while (1) {