mirror of
https://github.com/uroni/urbackup_backend.git
synced 2025-10-26 11:36:50 +00:00
Merge branch '2.5.x' of server.raiber.de:~/urbackup_backend into 2.5.x
This commit is contained in:
commit
cad4f83fc6
@ -1709,20 +1709,18 @@ void ClientConnector::CMD_INCR_IMAGE(const std::string &cmd, bool ident_ok)
|
||||
|
||||
state = CCSTATE_IMAGE_HASHDATA;
|
||||
|
||||
size_t bufpos = 0;
|
||||
IFile* datafile = hashdatafile;
|
||||
_u32* dataleft = &hashdataleft;
|
||||
while(bufpos<tcpstack.getBuffersize())
|
||||
while(tcpstack.getBuffersize()>0)
|
||||
{
|
||||
_u32 towrite = (std::min)(static_cast<_u32>(tcpstack.getBuffersize() - bufpos), *dataleft);
|
||||
if(datafile->Write(tcpstack.getBuffer()+ bufpos, towrite)!= towrite)
|
||||
_u32 towrite = (std::min)(static_cast<_u32>(tcpstack.getBuffersize()), *dataleft);
|
||||
if(datafile->Write(tcpstack.getBuffer(), towrite)!= towrite)
|
||||
{
|
||||
Server->Log("Error writing to data temporary file in CMD_INCR_IMAGE", LL_ERROR);
|
||||
do_quit=true;
|
||||
return;
|
||||
}
|
||||
|
||||
bufpos += towrite;
|
||||
*dataleft -= towrite;
|
||||
|
||||
tcpstack.removeFront(towrite);
|
||||
|
||||
@ -2778,7 +2778,8 @@ bool ServerCleanupThread::cleanup_clientlists()
|
||||
{
|
||||
int backupid = watoi(getbetween("clientlist_b_", ".ub", files[i].name));
|
||||
|
||||
if(cleanupdao->hasMoreRecentFileBackup(backupid).exists)
|
||||
if(!cleanupdao->getFileBackupInfo(backupid).exists ||
|
||||
cleanupdao->hasMoreRecentFileBackup(backupid).exists)
|
||||
{
|
||||
if(!Server->deleteFile(os_file_prefix(srcfolder+os_file_sep()+files[i].name)))
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user