From 022a3fcd923ec49a980b2a867751a7176390aaa3 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Fri, 30 May 2014 15:46:51 +0200 Subject: [PATCH] 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 f683152d4..1649f5ec0 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;