From 328bf1a4ea3f146f8fefaa427e831c6acd7e95b0 Mon Sep 17 00:00:00 2001 From: zhaominyong Date: Thu, 14 Jul 2022 13:38:03 +0800 Subject: [PATCH] =?UTF-8?q?129668=20=E3=80=90=E5=A4=87=E4=BB=BD=E8=BF=98?= =?UTF-8?q?=E5=8E=9F=E3=80=91=E5=88=9B=E5=BB=BAGhost=E9=95=9C=E5=83=8F?= =?UTF-8?q?=E5=88=B0=E7=A9=BA=E9=97=B4=E4=B8=8D=E8=B6=B3=E7=9A=84U?= =?UTF-8?q?=E7=9B=98=E4=B8=AD=EF=BC=8C=E4=B8=8D=E4=BC=9A=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E2=80=9C=E7=A9=BA=E9=97=B4=E4=B8=8D=E8=B6=B3=E2=80=9D=EF=BC=8C?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E7=BB=93=E6=9D=9F=E5=90=8EU=E7=9B=98?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E4=B8=8B=E6=9C=89ghost=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=A4=B9=E9=87=8C=E9=9D=A2=E6=B2=A1=E6=9C=89=E9=95=9C=E5=83=8F?= =?UTF-8?q?=E6=96=87=E4=BB=B6(=E6=97=A5=E5=BF=97=E4=B8=AD=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=89=A9=E4=BD=99=E7=A9=BA=E9=97=B4=E4=B8=8D=E8=B6=B3?= =?UTF-8?q?=EF=BC=8C=E4=BD=86=E6=98=AF=E6=B2=A1=E6=9C=89=E4=B8=8A=E6=8A=A5?= =?UTF-8?q?=E5=89=8D=E7=AB=AF)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backup-daemon/customizeghostImageproxy.cpp | 3 +-- backup-daemon/ghostimageproxy.cpp | 3 +-- backup-daemon/udiskghostImageproxy.cpp | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/backup-daemon/customizeghostImageproxy.cpp b/backup-daemon/customizeghostImageproxy.cpp index 1ef0882..375388e 100755 --- a/backup-daemon/customizeghostImageproxy.cpp +++ b/backup-daemon/customizeghostImageproxy.cpp @@ -78,8 +78,7 @@ bool CustomizeGhostImageProxy::checkEnvEx() } // 4、校验空间是否充足 - QFileInfo backup(m_srcPath); - qint64 itotalSize = backup.size(); + qint64 itotalSize = Utils::getDirOrFileSize(m_srcPath); m_destPath = m_backupWrapper.m_prefixDestPath + GHOST_PATH; m_destPath.replace("//", "/"); Utils::mkpath(m_destPath); diff --git a/backup-daemon/ghostimageproxy.cpp b/backup-daemon/ghostimageproxy.cpp index 505a030..1b16313 100755 --- a/backup-daemon/ghostimageproxy.cpp +++ b/backup-daemon/ghostimageproxy.cpp @@ -58,8 +58,7 @@ bool GhostImageProxy::checkEnvEx() emit checkResult(int(BackupResult::GHOST_SRC_DIRECTORY_IS_NOT_EXIST)); return false; } - QFileInfo backup(dataPath); - qint64 itotalSize = backup.size(); + qint64 itotalSize = Utils::getDirOrFileSize(dataPath); // 4、校验空间大小是否充足 m_destPath = Utils::getSysRootPath() + GHOST_PATH; diff --git a/backup-daemon/udiskghostImageproxy.cpp b/backup-daemon/udiskghostImageproxy.cpp index af793f9..2f0936d 100755 --- a/backup-daemon/udiskghostImageproxy.cpp +++ b/backup-daemon/udiskghostImageproxy.cpp @@ -73,8 +73,7 @@ bool UDiskGhostImageProxy::checkEnvEx() emit checkResult(int(BackupResult::GHOST_SRC_DIRECTORY_IS_NOT_EXIST)); return false; } - QFileInfo backup(dataPath); - qint64 itotalSize = backup.size(); + qint64 itotalSize = Utils::getDirOrFileSize(dataPath); // 4、校验移动设备情况:空间大小、文件格式、挂载模式等 QString backupPath(m_backupWrapper.m_prefixDestPath);