mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
bugfix: streaming assets folder hash
This commit is contained in:
@@ -65,7 +65,7 @@ void SendSystem::sendFileBlock(QString path)
|
||||
|
||||
|
||||
|
||||
socket->waitForBytesWritten(10);
|
||||
//socket->waitForBytesWritten(10);
|
||||
|
||||
if(file.open(QFile::ReadOnly))
|
||||
{
|
||||
@@ -73,7 +73,7 @@ void SendSystem::sendFileBlock(QString path)
|
||||
{
|
||||
QByteArray data = file.read(1025*250);
|
||||
stream << data;
|
||||
socket->waitForBytesWritten(10);
|
||||
//socket->waitForBytesWritten(10);
|
||||
|
||||
if(socket->state() == QAbstractSocket::UnconnectedState) break;
|
||||
countSend++;
|
||||
@@ -84,8 +84,8 @@ void SendSystem::sendFileBlock(QString path)
|
||||
|
||||
file.close();
|
||||
countSend = 0;
|
||||
socket->waitForBytesWritten(10);
|
||||
socket->waitForReadyRead(20);
|
||||
// socket->waitForBytesWritten(10);
|
||||
// socket->waitForReadyRead(20);
|
||||
}
|
||||
|
||||
void SendSystem::sendVersion()
|
||||
@@ -201,6 +201,7 @@ void SendSystem::sendXmlAnswer(QByteArray array, PacketType packetType)
|
||||
socket->waitForBytesWritten();
|
||||
}
|
||||
|
||||
socket->flush();
|
||||
socket->waitForReadyRead(2000);
|
||||
}
|
||||
|
||||
@@ -236,12 +237,12 @@ void SendSystem::updateFiles(QList<FileData> fileSendList, QList<FileData> delet
|
||||
if (data.hash == "FOLDER")
|
||||
{
|
||||
sendFolderBlock(data.path);
|
||||
socket->waitForReadyRead(100);
|
||||
socket->waitForBytesWritten();
|
||||
}
|
||||
else
|
||||
{
|
||||
sendFileBlock(data.path);
|
||||
socket->waitForReadyRead(100);
|
||||
socket->waitForBytesWritten();
|
||||
}
|
||||
|
||||
if(isSendStopped) return;
|
||||
|
||||
@@ -187,6 +187,10 @@ void UpdateController::setUpCurrentServerHash()
|
||||
{
|
||||
QList<FileData> *fileList = new QList<FileData>;
|
||||
fileList->append(*calculateHash(buildPath));
|
||||
FileData *streamingFolder = new FileData;
|
||||
streamingFolder->hash = "FOLDER";
|
||||
streamingFolder->path = buildDataPath + streamingAssetsFolderName;
|
||||
fileList->append(*streamingFolder);
|
||||
fileList->append(*calculateHash(currentStreamingPath));
|
||||
assetManager->prepareLocalPathList(fileList);
|
||||
|
||||
@@ -309,7 +313,7 @@ QList<FileData>* UpdateController::calculateHash(QString path)
|
||||
filter << "*";
|
||||
QList<FileData> *files = new QList<FileData>;
|
||||
|
||||
QDirIterator dirIterator(path,filter, QDir::AllEntries | QDir::NoDotAndDotDot, QDirIterator::Subdirectories);
|
||||
QDirIterator dirIterator(path,filter, QDir::AllEntries, QDirIterator::Subdirectories);
|
||||
|
||||
while (dirIterator.hasNext())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user