From 297cdec73a64a2634211fd7f26d32bfc840d1ae9 Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Mon, 9 Sep 2024 10:39:47 +0200 Subject: [PATCH] do not ignore paths containing 2 "#" characters those path may be in use on Windows and are legitimate Signed-off-by: Matthieu Gallien --- src/gui/ignorelisttablewidget.cpp | 3 +++ sync-exclude.lst | 1 - test/testexcludedfiles.cpp | 2 -- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/ignorelisttablewidget.cpp b/src/gui/ignorelisttablewidget.cpp index 8e93630a7..f6dd7347f 100644 --- a/src/gui/ignorelisttablewidget.cpp +++ b/src/gui/ignorelisttablewidget.cpp @@ -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(']')) { diff --git a/sync-exclude.lst b/sync-exclude.lst index a238434cd..2f0223eb9 100644 --- a/sync-exclude.lst +++ b/sync-exclude.lst @@ -49,6 +49,5 @@ System Volume Information My Saved Places. -\#*# *.sb-* diff --git a/test/testexcludedfiles.cpp b/test/testexcludedfiles.cpp index a6ff38855..ea5257484 100644 --- a/test/testexcludedfiles.cpp +++ b/test/testexcludedfiles.cpp @@ -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()