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,13 +693,17 @@ void OwnCloudSync::syncFiles()
query = queryDBFileInfo(serverName,"local_files");
}
if( !query.next() ) {
if( serverType == "collection") {
localDirs.append(serverName);
} else {
mDownloadingFiles.enqueue(FileInfo(serverName,serverSize));
mTotalToDownload += serverSize;
// 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 {
mDownloadingFiles.enqueue(FileInfo(serverName,serverSize));
mTotalToDownload += serverSize;
}
syncDebug() << "DOWNLOAD new file: " << serverName;
}
syncDebug() << "DOWNLOAD new file: " << serverName;
}
}
for( int i = 0; i < mDownloadConflict.size(); i++ ) {