add: dir not and zero file size not trans and set recent ip to front.

This commit is contained in:
2025-06-29 00:36:10 +08:00
parent 07cd9b8a51
commit 2b87eb917a
4 changed files with 34 additions and 7 deletions

View File

@@ -40,6 +40,12 @@ void FileTrans::ReqSendFile(const TransTask& task)
QFileInfo fileInfo(info.fromPath);
if (fileInfo.exists()) {
qint64 size = fileInfo.size();
if (size == 0) {
qCritical() << QString(tr("File [%1] size is 0, will not send.")).arg(info.fromPath);
sendTask_->file.close();
sendTask_->state = TaskState::STATE_FINISH;
return;
}
info.permissions = static_cast<quint32>(fileInfo.permissions());
info.size = size;
} else {