do not ignore paths containing 2 "#" characters
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Mon, 9 Sep 2024 08:39:47 +0000 (10:39 +0200)
committerMatthieu Gallien <matthieu.gallien@nextcloud.com>
Mon, 9 Sep 2024 09:03:57 +0000 (11:03 +0200)
those path may be in use on Windows and are legitimate

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
src/gui/ignorelisttablewidget.cpp
sync-exclude.lst
test/testexcludedfiles.cpp

index 8e93630a721f41506334d469d0aa1fd9ad5d667a..f6dd7347fe14ba92eac10f044bb127f6cd288e1b 100644 (file)
@@ -127,6 +127,9 @@ void IgnoreListTableWidget::readIgnoreFile(const QString &file, bool readOnly)
         while (!ignores.atEnd()) {
             QString line = QString::fromUtf8(ignores.readLine());
             line.chop(1);
+            if (line == QStringLiteral("\\#*#")) {
+                continue;
+            }
             if (!line.isEmpty() && !line.startsWith("#")) {
                 bool deletable = false;
                 if (line.startsWith(']')) {
index a238434cd3b57ec6fb900e3427acbdf8af4ada2f..2f0223eb9e7ed53c42f26bb938d620b7e914fd0e 100644 (file)
@@ -49,6 +49,5 @@ System Volume Information
 
 My Saved Places.
 
-\#*#
 
 *.sb-*
index a6ff3885557515a2df29c8708e8a42ff4ba69171..ea525748447bfae823adace76a13c5844a7032cb 100644 (file)
@@ -94,8 +94,6 @@ private slots:
         QVERIFY(excluded.isExcluded("/a/foo_conflict-bar", "/a", keepHidden));
         QVERIFY(excluded.isExcluded("/a/foo (conflicted copy bar)", "/a", keepHidden));
         QVERIFY(excluded.isExcluded("/a/.b", "/a", excludeHidden));
-
-        QVERIFY(excluded.isExcluded("/a/#b#", "/a", keepHidden));
     }
 
     void check_csync_exclude_add()