[Pkg-owncloud-commits] [owncloud-client] 26/83: Check for case clash on downloads.
Sandro Knauß
hefee-guest at moszumanska.debian.org
Sat May 31 11:31:40 UTC 2014
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 bbdf7bf9550908bf3f4cbf0e64104e8111a6c5b9
Author: Klaas Freitag <freitag at owncloud.com>
Date: Fri May 23 18:55:44 2014 +0200
Check for case clash on downloads.
---
src/mirall/propagator_qnam.cpp | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/mirall/propagator_qnam.cpp b/src/mirall/propagator_qnam.cpp
index 26ddba6..ebf0381 100644
--- a/src/mirall/propagator_qnam.cpp
+++ b/src/mirall/propagator_qnam.cpp
@@ -22,6 +22,7 @@
#include "propagatorjobs.h"
#include <QNetworkAccessManager>
#include <QFileInfo>
+#include <QDir>
#include <cmath>
namespace Mirall {
@@ -430,8 +431,6 @@ void GETFileJob::slotReadyRead()
resetTimeout();
}
-
-
void PropagateDownloadFileQNAM::start()
{
if (_propagator->_abortRequested.fetchAndAddRelaxed(0))
@@ -439,6 +438,13 @@ void PropagateDownloadFileQNAM::start()
qDebug() << Q_FUNC_INFO << _item._file << _propagator->_activeJobs;
+ // do a case clash check.
+ if( Utility::fsCasePreserving() && _propagator->localFileNameClash(_item._file) ) {
+ done( SyncFileItem::NormalError, tr("File %1 can not be downloaded because of a local file name clash!")
+ .arg(QDir::toNativeSeparators(_item._file)) );
+ return;
+ }
+
emit progress(_item, 0);
QString tmpFileName;
--
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