[Pkg-owncloud-commits] [owncloud-client] 24/83: Read the blacklist entries case insensitive in case the file system is only case preserving.
Sandro Knauß
hefee-guest at moszumanska.debian.org
Sat May 31 11:31:40 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 ea9f302b7aa462e2c14662308a762ead659ab773
Author: Klaas Freitag <freitag at owncloud.com>
Date: Fri May 23 16:00:51 2014 +0200
Read the blacklist entries case insensitive in case the file
system is only case preserving.
---
src/mirall/propagatorjobs.cpp | 2 +-
src/mirall/syncjournaldb.cpp | 10 +++++++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/mirall/propagatorjobs.cpp b/src/mirall/propagatorjobs.cpp
index 6fab6a5..72cc7ad 100644
--- a/src/mirall/propagatorjobs.cpp
+++ b/src/mirall/propagatorjobs.cpp
@@ -132,7 +132,7 @@ void PropagateLocalMkdir::start()
QDir newDir(_propagator->_localDir + _item._file);
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!";
done( SyncFileItem::NormalError, tr("Attention, possible case sensitivity clash with %1").arg(newDirStr) );
return;
diff --git a/src/mirall/syncjournaldb.cpp b/src/mirall/syncjournaldb.cpp
index fe691eb..90d0753 100644
--- a/src/mirall/syncjournaldb.cpp
+++ b/src/mirall/syncjournaldb.cpp
@@ -770,7 +770,15 @@ void SyncJournalDb::updateBlacklistEntry( const SyncJournalBlacklistRecord& item
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);
if( !query.exec() ) {
--
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