over:文件存在性校验功能完成。

This commit is contained in:
2025-11-08 21:51:42 +08:00
parent f8bbf02e04
commit d209d64061
7 changed files with 83 additions and 30 deletions

View File

@@ -90,11 +90,17 @@ void ClientCore::handleAsk(QSharedPointer<FrameBuffer> frame)
msg.command = STRMSG_AC_ANSWER_FILE_EXIST;
for (auto& item : msg.mapData) {
if (item.command == STRMSG_AC_UP) {
if (!Util::DirExist(item.path, false)) {
if (!Util::DirExist(item.remotePath, false)) {
item.state = static_cast<qint32>(FCS_DIR_NOT_EXIST);
continue;
}
auto newerPath = Util::Get2FilePath(item.localPath, item.remotePath);
if (Util::FileExist(newerPath)) {
item.state = static_cast<qint32>(FCS_FILE_EXIST);
continue;
}
} else {
if (!Util::FileExist(item.path)) {
if (!Util::FileExist(item.localPath)) {
item.state = static_cast<qint32>(FCS_FILE_NOT_EXIST);
}
}