[Pkg-owncloud-commits] [owncloud-client] 76/83: OS X: Fix localFileNameClash
Sandro Knauß
hefee-guest at moszumanska.debian.org
Sat May 31 11:31:46 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 022a3fcd923ec49a980b2a867751a7176390aaa3
Author: Markus Goetz <markus at woboq.com>
Date: Fri May 30 15:46:51 2014 +0200
OS X: Fix localFileNameClash
We need to compare the other way round and compare only the file name
because our sync directory might be symlinked and then resolve to
another canonical path (but we were only interested in the filename part
anyway)
---
src/mirall/owncloudpropagator.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/mirall/owncloudpropagator.cpp b/src/mirall/owncloudpropagator.cpp
index f683152..1649f5e 100644
--- a/src/mirall/owncloudpropagator.cpp
+++ b/src/mirall/owncloudpropagator.cpp
@@ -312,11 +312,11 @@ bool OwncloudPropagator::localFileNameClash( const QString& relFile )
if( !file.isEmpty() && Utility::fsCasePreserving() ) {
#ifdef Q_OS_MAC
QFileInfo fileInfo(file);
- if (!fileInfo.exists())
+ if (!fileInfo.exists()) {
re = false;
- else
- re = ( ! file.endsWith(fileInfo.canonicalFilePath(), Qt::CaseSensitive) );
-
+ } else {
+ re = ( ! fileInfo.canonicalFilePath().endsWith(relFile, Qt::CaseSensitive) );
+ }
#elif defined(Q_OS_WIN)
const QString file( _localDir + relFile );
qDebug() << "CaseClashCheck for " << file;
--
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