Do not save for resume if there is an error from the server

errors (such as 500) may mean the the server do not suport
resuming
Esse commit está contido em:
Olivier Goffart
2013-07-15 10:48:14 +02:00
commit de Klaas Freitag
commit 6beb96293f
+3 -1
Ver Arquivo
@@ -387,7 +387,9 @@ start_fd_based:
if (_push_to_tmp_first(ctx)) {
csync_vio_file_stat_t* sb = csync_vio_file_stat_new();
if (csync_vio_stat(ctx, turi, sb) == 0 && sb->size > 0) {
if (csync_vio_stat(ctx, turi, sb) == 0 && sb->size > 0
&& errno != EIO) {
/* EIO is mapped to error from owncloud like 500 for which we don't want to resume */
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE,
"keeping tmp file: %s", turi);
if (!progress_info) {