From 2c135560ebdf53cc19043c39cb78c8f0ea23a150 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 8e93630a721f4..f6dd7347fe14b 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 21e1813bc4f57..792f2d3cf5a78 100644 --- a/sync-exclude.lst +++ b/sync-exclude.lst @@ -44,6 +44,5 @@ System Volume Information My Saved Places. -\#*# *.sb-* diff --git a/test/testexcludedfiles.cpp b/test/testexcludedfiles.cpp index 458435da9b596..109e3425d764f 100644 --- a/test/testexcludedfiles.cpp +++ b/test/testexcludedfiles.cpp @@ -85,8 +85,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()