[Pkg-owncloud-commits] [owncloud-client] 50/83: Propagator: Implement localFileNameClash for OS X

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat May 31 11:31:42 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 c1b9d5c6534a56655017eddba256056e8b608bf0
Author: Markus Goetz <markus at woboq.com>
Date:   Mon May 26 17:36:52 2014 +0200

    Propagator: Implement localFileNameClash for OS X
---
 src/mirall/owncloudpropagator.cpp | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/mirall/owncloudpropagator.cpp b/src/mirall/owncloudpropagator.cpp
index 8635eee..45a670a 100644
--- a/src/mirall/owncloudpropagator.cpp
+++ b/src/mirall/owncloudpropagator.cpp
@@ -27,6 +27,7 @@
 #endif
 
 #include <QStack>
+#include <QFileInfo>
 
 namespace Mirall {
 
@@ -305,7 +306,14 @@ bool OwncloudPropagator::localFileNameClash( const QString& relFile )
     bool re = false;
     const QString file( _localDir + relFile );
     qDebug() << "CaseClashCheck for " << file;
-#ifdef Q_OS_WIN
+#ifdef Q_OS_OSX
+    QFileInfo fileInfo(file);
+    if (!fileInfo.exists())
+        re = false;
+    else
+        re = ( ! file.endsWith(fileInfo.canonicalFilePath(), Qt::CaseSensitive) );
+
+#elif defined(Q_OS_WIN)
     WIN32_FIND_DATA FindFileData;
     HANDLE hFind;
 

-- 
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