Fixed a bug where at startup, the client attempted to re-download

already deleted files.
This commit is contained in:
Juan Carlos Cornejo 2011-12-13 20:53:30 -05:00 committed by Klaas Freitag
parent 8be1e86eec
commit 1a63ad67f0

View file

@ -693,6 +693,9 @@ void OwnCloudSync::syncFiles()
query = queryDBFileInfo(serverName,"local_files");
}
if( !query.next() ) {
// If this is the first run, it could also just be a deleted file
query = queryDBFileInfo(serverName,"local_files");
if(mIsFirstRun && !query.next()) { // Could have just been a deleted file.
if( serverType == "collection") {
localDirs.append(serverName);
} else {
@ -702,6 +705,7 @@ void OwnCloudSync::syncFiles()
syncDebug() << "DOWNLOAD new file: " << serverName;
}
}
}
for( int i = 0; i < mDownloadConflict.size(); i++ ) {
mTotalToDownload += mDownloadConflict[i].size;
}