Bug 453569 - Project plugin filters leaving *.html untracked
Summary: Project plugin filters leaving *.html untracked
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: application (show other bugs)
Version: 22.04.1
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-09 09:39 UTC by Félim Whiteley
Modified: 2022-10-02 18:25 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 22.08.0
Sentry Crash Report:


Attachments
Example .kateproject file which causes the error (204 bytes, text/plain)
2022-05-09 09:39 UTC, Félim Whiteley
Details
Example of multiple named files in the untracked list (14.70 KB, image/png)
2022-05-09 09:40 UTC, Félim Whiteley
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Félim Whiteley 2022-05-09 09:39:11 UTC
Created attachment 148669 [details]
Example .kateproject file which causes the error

SUMMARY
I don't user git/svn integration to monitor Projects, instead I'[ve been using the recursive projewcts file with various filters. I will attach an example. It loads all the python, javascript etc. except the html files. In fact across multiple projects it does the same. Which makes it unworkable as I have various same named files in subdirectories like index.html which I end up with a list of. This worked in the prior version and I've used it since it existed, so only the 22.04.0 change has broken it.

STEPS TO REPRODUCE
1. Create a project .kateproject file in the top directory of a project
2. Set the recursive mode and filters for various files.
3. *.html files will end up untracked

OBSERVED RESULT
Every html file from the project is in a flat list in the untracked directory.

EXPECTED RESULT
The html files should appear in the various directories they are located and those directories should appear in the project tree.

SOFTWARE/OS VERSIONS
Operating System: KDE neon 5.24
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.93.0
Qt Version: 5.15.3
Kernel Version: 5.13.0-40-generic (64-bit)
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 2600X Six-Core Processor
Memory: 62.7 GiB of RAM
Graphics Processor: Radeon RX 580 Series

ADDITIONAL INFORMATION
Comment 1 Félim Whiteley 2022-05-09 09:40:06 UTC
Created attachment 148670 [details]
Example of multiple named files in the untracked list
Comment 2 Félim Whiteley 2022-05-12 16:11:48 UTC
Updated Version as still present in 22.04.1
Comment 3 Félim Whiteley 2022-05-12 16:27:06 UTC
So I removed the filter from the JSON and replaced it with "svn": 1 and it all works correctly. Yes. SVN. Old project etc. It would be great if filter worked again though because some projects have binary files etc. be nice to hide from view.

anyway thanks!
Comment 4 Christoph Cullmann 2022-10-02 18:25:17 UTC
Hmm, strange, I tried that with 22.08, works, but I am not aware of any fixes for that.

Only hint is this:

commit 6c5f6e0f8c8603fa0a2e0f43ff3ea37b65dd4864
Author: Waqar Ahmed <waqar.17a@gmail.com>
Date:   Mon Mar 15 19:02:22 2021 +0500

    Revert change to project['list']

diff --git a/addons/project/kateprojectworker.cpp b/addons/project/kateprojectworker.cpp
index 17d9b406a..284521af3 100644
--- a/addons/project/kateprojectworker.cpp
+++ b/addons/project/kateprojectworker.cpp
@@ -373,9 +373,9 @@ QVector<QString> KateProjectWorker::findFiles(const QDir &dir, const QVariantMap
          * all code later requires this and the filesFrom... routines do this, too, internally
          * even without this, the tree views will show them, but opening them will create new elements!
          */
-        //        for (auto &file : userGivenFilesList) {
-        //            file = dir.absoluteFilePath(file);
-        //        }
+        for (auto &file : userGivenFilesList) {
+            file = dir.absoluteFilePath(file);
+        }
 
         /**
          * users might have specified duplicates, this can't happen for the other ways


Please try 22.08, sorry for the issue.