[Pkg-owncloud-commits] [owncloud-client] 58/89: Don't keep the temporary file if the transfer fails because of a wrong etag
Sandro Knauß
hefee-guest at moszumanska.debian.org
Sat Dec 14 01:02:36 UTC 2013
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit bf309f83f43f88503483c75a587033e313dd90a0
Author: Olivier Goffart <ogoffart at woboq.com>
Date: Wed Dec 11 12:48:11 2013 +0100
Don't keep the temporary file if the transfer fails because of a wrong etag
The downloaded file is corrupted, remove it.
---
src/mirall/owncloudpropagator.cpp | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/mirall/owncloudpropagator.cpp b/src/mirall/owncloudpropagator.cpp
index 9d10030..db5e75e 100644
--- a/src/mirall/owncloudpropagator.cpp
+++ b/src/mirall/owncloudpropagator.cpp
@@ -744,12 +744,10 @@ void PropagateDownloadFile::start()
// This one is set by install_content_reader if e.g. there is no E-Tag
if (!errorString.isEmpty()) {
- if (tmpFile.size() == 0) {
- // don't keep the temporary file if it is empty.
- tmpFile.close();
- tmpFile.remove();
- _propagator->_journal->setDownloadInfo(_item._file, SyncJournalDb::DownloadInfo());
- }
+ // don't keep the temporary file as the file downloaded so far is invalid
+ tmpFile.close();
+ tmpFile.remove();
+ _propagator->_journal->setDownloadInfo(_item._file, SyncJournalDb::DownloadInfo());
done(SyncFileItem::SoftError, errorString);
return;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list