[Pkg-owncloud-commits] [owncloud-client] 79/498: Merge remote-tracking branch 'origin/1.9'

Sandro Knauß hefee-guest at moszumanska.debian.org
Tue Aug 11 14:48: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 b54f2b3b31425e5e398511b7c1c5feb88edbf317
Merge: 7ea1baa a36df4a
Author: Daniel Molkentin <danimo at owncloud.com>
Date:   Tue May 12 10:03:38 2015 +0200

    Merge remote-tracking branch 'origin/1.9'
    
    Conflicts:
    	VERSION.cmake
    	src/libsync/propagatedownload.cpp
    	src/libsync/propagateupload.cpp

 ChangeLog                                          |   6 +-
 binary                                             |   2 +-
 binary.rej                                         |   5 +
 csync/src/csync_exclude.c                          |   1 +
 csync/src/csync_log.h                              |   2 +-
 csync/src/httpbf/src/httpbf.c                      |   2 +-
 csync/tests/csync_tests/check_csync_log.c          |   2 +-
 .../MacOSX/OwnCloudFinder/ContentManager.h         |   4 +-
 .../MacOSX/OwnCloudFinder/ContentManager.m         |  85 +++-----
 .../MacOSX/OwnCloudFinder/RequestManager.h         |   3 +-
 .../MacOSX/OwnCloudFinder/RequestManager.m         |  22 ++-
 shell_integration/MacOSX/deploy.sh                 |   7 +-
 .../windows/OCUtil/RemotePathChecker.cpp           |  44 +++--
 .../windows/OCUtil/RemotePathChecker.h             |   1 +
 src/gui/accountsettings.cpp                        |   6 +-
 src/gui/accountstate.cpp                           |  12 +-
 src/gui/accountstate.h                             |   8 +-
 src/gui/application.cpp                            |  11 +-
 src/gui/owncloudgui.cpp                            |   2 +-
 src/gui/owncloudsetupwizard.cpp                    |   4 +
 src/gui/protocolwidget.cpp                         |   2 +-
 src/gui/sharedialog.cpp                            | 107 +++++-----
 src/gui/sharedialog.h                              |  15 +-
 src/gui/updater/sparkleupdater_mac.mm              |  22 ++-
 src/gui/wizard/owncloudsetuppage.cpp               |   3 +-
 src/libsync/account.cpp                            |  36 +++-
 src/libsync/account.h                              |   7 +-
 src/libsync/bandwidthmanager.cpp                   |  58 +++---
 src/libsync/connectionvalidator.cpp                |  13 +-
 src/libsync/connectionvalidator.h                  |   2 +-
 src/libsync/filesystem.cpp                         |  46 ++++-
 src/libsync/filesystem.h                           |  37 +++-
 src/libsync/networkjobs.cpp                        |  19 +-
 src/libsync/networkjobs.h                          |   2 +-
 src/libsync/propagatedownload.cpp                  |  66 +++++--
 src/libsync/propagateupload.cpp                    |  46 ++++-
 src/libsync/propagateupload.h                      |  15 ++
 src/libsync/propagator_legacy.cpp                  |   6 +-
 src/mirall/qbacktrace.h                            |  24 +++
 test/mockserver/CMakeLists.txt                     |  21 ++
 test/mockserver/httpserver.cpp                     |  63 ++++++
 test/mockserver/httpserver.h                       |  26 +++
 test/mockserver/main.cpp                           |  23 +++
 test/testowncloudpropagator.h                      |  44 +++++
 test/testxmlparse.h                                | 210 +++++++++++++++++++-
 translations/client_ca.ts                          | 174 +++++++++--------
 translations/client_cs.ts                          | 174 +++++++++--------
 translations/client_de.ts                          | 184 ++++++++++--------
 translations/client_el.ts                          | 174 +++++++++--------
 translations/client_en.ts                          | 174 +++++++++--------
 translations/client_es.ts                          | 174 +++++++++--------
 translations/client_es_AR.ts                       | 174 +++++++++--------
 translations/client_et.ts                          | 174 +++++++++--------
 translations/client_eu.ts                          | 174 +++++++++--------
 translations/client_fa.ts                          | 174 +++++++++--------
 translations/client_fi.ts                          | 216 +++++++++++----------
 translations/client_fr.ts                          | 174 +++++++++--------
 translations/client_gl.ts                          | 174 +++++++++--------
 translations/client_hu.ts                          | 174 +++++++++--------
 translations/client_it.ts                          | 174 +++++++++--------
 translations/client_ja.ts                          | 174 +++++++++--------
 translations/client_nl.ts                          | 174 +++++++++--------
 translations/client_pl.ts                          | 174 +++++++++--------
 translations/client_pt.ts                          | 174 +++++++++--------
 translations/client_pt_BR.ts                       | 174 +++++++++--------
 translations/client_ru.ts                          | 174 +++++++++--------
 translations/client_sk.ts                          | 174 +++++++++--------
 translations/client_sl.ts                          | 174 +++++++++--------
 translations/client_sr.ts                          | 174 +++++++++--------
 translations/client_sv.ts                          | 174 +++++++++--------
 translations/client_th.ts                          | 174 +++++++++--------
 translations/client_tr.ts                          | 174 +++++++++--------
 translations/client_uk.ts                          | 174 +++++++++--------
 translations/client_zh_CN.ts                       | 174 +++++++++--------
 translations/client_zh_TW.ts                       | 174 +++++++++--------
 75 files changed, 3792 insertions(+), 2622 deletions(-)

diff --cc src/libsync/propagatedownload.cpp
index bd82f0e,a033748..6fde599
--- a/src/libsync/propagatedownload.cpp
+++ b/src/libsync/propagatedownload.cpp
@@@ -514,21 -534,37 +534,37 @@@ void PropagateDownloadFileQNAM::downloa
          }
      }
  
-     QFileInfo existingFile(fn);
-     if(FileSystem::fileExists(fn) && existingFile.permissions() != _tmpFile.permissions()) {
-         _tmpFile.setPermissions(existingFile.permissions());
-     }
- 
-     FileSystem::setModTime(_tmpFile.fileName(), _item->_modtime);
+     FileSystem::setModTime(_tmpFile.fileName(), _item._modtime);
      // We need to fetch the time again because some file system such as FAT have a less than a second
      // Accuracy, and we really need the time from the file system. (#3103)
 -    _item._modtime = FileSystem::getModTime(_tmpFile.fileName());
 +    _item->_modtime = FileSystem::getModTime(_tmpFile.fileName());
  
+     if (FileSystem::fileExists(fn)) {
+         // Preserve the existing file permissions.
+         QFileInfo existingFile(fn);
+         if (existingFile.permissions() != _tmpFile.permissions()) {
+             _tmpFile.setPermissions(existingFile.permissions());
+         }
+ 
+         // Check whether the existing file has changed since the discovery
+         // phase by comparing size and mtime to the previous values. This
+         // is necessary to avoid overwriting user changes that happened between
+         // the discovery phase and now.
+         const qint64 expectedSize = _item.log._other_size;
+         const time_t expectedMtime = _item.log._other_modtime;
+         if (! FileSystem::verifyFileUnchanged(fn, expectedSize, expectedMtime)) {
+             _propagator->_anotherSyncNeeded = true;
+             done(SyncFileItem::SoftError, tr("File has changed since discovery"));
+             return;
+         }
+     }
+ 
      QString error;
      _propagator->addTouchedFile(fn);
-     FileSystem::setFileHidden(_tmpFile.fileName(), false);
-     if (!FileSystem::renameReplace(_tmpFile.fileName(), fn, &error)) {
+     // The fileChanged() check is done above to generate better error messages.
+     if (!FileSystem::uncheckedRenameReplace(_tmpFile.fileName(), fn, &error)) {
          qDebug() << Q_FUNC_INFO << QString("Rename failed: %1 => %2").arg(_tmpFile.fileName()).arg(fn);
+ 
          // If we moved away the original file due to a conflict but can't
          // put the downloaded file in its place, we are in a bad spot:
          // If we do nothing the next sync run will assume the user deleted
diff --cc src/libsync/propagateupload.cpp
index a76ac2d,887731e..946975f
--- a/src/libsync/propagateupload.cpp
+++ b/src/libsync/propagateupload.cpp
@@@ -471,9 -494,21 +494,21 @@@ void PropagateUploadFileQNAM::slotPutFi
      }
  
      QNetworkReply::NetworkError err = job->reply()->error();
+ 
+ #if QT_VERSION < QT_VERSION_CHECK(5, 4, 2)
+     if (err == QNetworkReply::OperationCanceledError && job->reply()->property(owncloudShouldSoftCancelPropertyName).isValid()) {
+         // Abort the job and try again later.
+         // This works around a bug in QNAM wich might reuse a non-empty buffer for the next request.
+         qDebug() << "Forcing job abort on HTTP connection reset with Qt < 5.4.2.";
+         _propagator->_anotherSyncNeeded = true;
+         done(SyncFileItem::SoftError, tr("Forcing job abort on HTTP connection reset with Qt < 5.4.2."));
+         return;
+     }
+ #endif
+ 
      if (err != QNetworkReply::NoError) {
 -        _item._httpErrorCode = job->reply()->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
 -        if(checkForProblemsWithShared(_item._httpErrorCode,
 +        _item->_httpErrorCode = job->reply()->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
 +        if(checkForProblemsWithShared(_item->_httpErrorCode,
              tr("The file was edited locally but is part of a read only share. "
                 "It is restored and your edit is in the conflict file."))) {
              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