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);