mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 15:06:08 +03:00
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)
This commit is contained in:
parent
064dcdb25a
commit
022a3fcd92
1 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue