mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-24 05:55:59 +03:00
Read the blacklist entries case insensitive in case the file
system is only case preserving.
This commit is contained in:
parent
ef0a3c212e
commit
ea9f302b7a
2 changed files with 10 additions and 2 deletions
|
@ -132,7 +132,7 @@ void PropagateLocalMkdir::start()
|
||||||
|
|
||||||
QDir newDir(_propagator->_localDir + _item._file);
|
QDir newDir(_propagator->_localDir + _item._file);
|
||||||
QString newDirStr = QDir::toNativeSeparators(newDir.path());
|
QString newDirStr = QDir::toNativeSeparators(newDir.path());
|
||||||
if(newDir.exists() && hasCaseClash(_propagator->_localDir + _item._file ) ) { // add a check on the file name
|
if( Utility::fsCasePreserving() && newDir.exists() && hasCaseClash(_propagator->_localDir + _item._file ) ) { // add a check on the file name
|
||||||
qDebug() << "WARN: new directory to create locally already exists!";
|
qDebug() << "WARN: new directory to create locally already exists!";
|
||||||
done( SyncFileItem::NormalError, tr("Attention, possible case sensitivity clash with %1").arg(newDirStr) );
|
done( SyncFileItem::NormalError, tr("Attention, possible case sensitivity clash with %1").arg(newDirStr) );
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -770,7 +770,15 @@ void SyncJournalDb::updateBlacklistEntry( const SyncJournalBlacklistRecord& item
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
query.prepare("SELECT retrycount FROM blacklist WHERE path=:path");
|
QString sql("SELECT retrycount FROM blacklist WHERE path=:path");
|
||||||
|
|
||||||
|
if( Utility::fsCasePreserving() ) {
|
||||||
|
// if the file system is case preserving we have to check the blacklist
|
||||||
|
// case insensitively
|
||||||
|
sql += QLatin1String(" COLLATE NOCASE");
|
||||||
|
}
|
||||||
|
|
||||||
|
query.prepare(sql);
|
||||||
query.bindValue(":path", item._file);
|
query.bindValue(":path", item._file);
|
||||||
|
|
||||||
if( !query.exec() ) {
|
if( !query.exec() ) {
|
||||||
|
|
Loading…
Reference in a new issue