[Pkg-owncloud-commits] [owncloud-client] 141/159: Discovery: Fix another empty-local-directory bug
Sandro Knauß
hefee-guest at moszumanska.debian.org
Fri May 1 13:05:37 UTC 2015
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 3a52db46adf887ff8898df01ee257b3589e48a0e
Author: Markus Goetz <markus at woboq.com>
Date: Thu Apr 23 16:15:13 2015 +0200
Discovery: Fix another empty-local-directory bug
---
src/libsync/discoveryphase.cpp | 16 +++-------------
1 file changed, 3 insertions(+), 13 deletions(-)
diff --git a/src/libsync/discoveryphase.cpp b/src/libsync/discoveryphase.cpp
index 2d3981e..38aa83c 100644
--- a/src/libsync/discoveryphase.cpp
+++ b/src/libsync/discoveryphase.cpp
@@ -83,21 +83,11 @@ void DiscoveryJob::update_job_update_callback (bool local,
}
}
-
+// Only use for error cases! It will always set an error errno
int get_errno_from_http_errcode( int err, const QString & reason ) {
- int new_errno = 0;
+ int new_errno = EIO;
switch(err) {
- case 200: /* OK */
- case 201: /* Created */
- case 202: /* Accepted */
- case 203: /* Non-Authoritative Information */
- case 204: /* No Content */
- case 205: /* Reset Content */
- case 207: /* Multi-Status */
- case 304: /* Not Modified */
- new_errno = 0;
- break;
case 401: /* Unauthorized */
case 402: /* Payment Required */
case 407: /* Proxy Authentication Required */
@@ -316,7 +306,7 @@ void DiscoverySingleDirectoryJob::lsJobFinishedWithErrorSlot(QNetworkReply *r)
// Default keep at EIO, see above
}
- emit finishedWithError(errnoCode, msg);
+ emit finishedWithError(errnoCode == 0 ? EIO : errnoCode, msg);
deleteLater();
}
--
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