improve logs of OwncloudPropagator::localFileNameClash
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Tue, 28 Jun 2022 12:42:40 +0000 (14:42 +0200)
committerClaudio Cambra <claudio.cambra@gmail.com>
Wed, 20 Jul 2022 12:17:49 +0000 (14:17 +0200)
no need to print a line each time we check for a name clash

always print a line when a clash is detected

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
src/libsync/owncloudpropagator.cpp

index 889c0dce02499fdb3d0b5fc4cb7fa3a77cc1e818..245a8e8d6026d2eb868bb071b7234303a16b24b8 100644 (file)
@@ -682,7 +682,6 @@ bool OwncloudPropagator::localFileNameClash(const QString &relFile)
     Q_ASSERT(!file.isEmpty());
 
     if (!file.isEmpty() && Utility::fsCasePreserving()) {
-        qCDebug(lcPropagator) << "CaseClashCheck for " << file;
 #ifdef Q_OS_MAC
         const QFileInfo fileInfo(file);
         if (!fileInfo.exists()) {
@@ -718,6 +717,7 @@ bool OwncloudPropagator::localFileNameClash(const QString &relFile)
         const QString fn = fileInfo.fileName();
         const QStringList list = fileInfo.dir().entryList({ fn });
         if (list.count() > 1 || (list.count() == 1 && list[0] != fn)) {
+            qCWarning(lcPropagator) << "Detected case clash between" << file << "and" << list.constFirst();
             return true;
         }
 #endif