Bug 493248 - Kate project plugin doesn't show any files
Summary: Kate project plugin doesn't show any files
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 24.08.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-17 09:26 UTC by Johannes
Modified: 2024-09-18 08:51 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes 2024-09-17 09:26:30 UTC
Kate project plugin doesn't show any files


STEPS TO REPRODUCE

Create a .kateproject with a files entry with "recursive:1" set. Add a filter expression like "*.cc". 

OBSERVED RESULT

Files in subdirectories do not appear in the project files tree. 

EXPECTED RESULT

Files in subdirectories that match the given filter expression should appear in the project files tree. This works with kate 24.01.95 but doesn't work in 24.08.1. 

Observation: If "*" is used as an filter expression all files do appear recursively. 


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Current Arch Linux
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2

ADDITIONAL INFORMATION

Xfce window manager
Comment 1 Waqar Ahmed 2024-09-17 09:28:41 UTC
Please share the .kateproject file.
Comment 2 Johannes 2024-09-17 09:33:44 UTC
{
	"name": "xxx",
	
	"directory": ".",
	
	"files":
	[
		{
			"filters": ["*.java", "*.cc", "*.cpp", "*.h", "*.hpp", "*.hh"], 
			"recursive": 1
		}
	]
}

Did some bisection, it works in 24.02 but doesn't work in 24.05.
Comment 3 Christoph Cullmann 2024-09-17 16:01:06 UTC
Git commit 8362fdac50283b4c469e4c7a509f7cd4a7add4e1 by Christoph Cullmann, on behalf of Waqar Ahmed.
Committed on 17/09/2024 at 16:01.
Pushed by cullmann into branch 'master'.

Fix recursive directory traversal and remove file skipping

Reverts 1c62b82d354cdd06b85a5d3d01ee49844546e763

The manual directory traversal was broken if someone used name filters.
Besides that, we have "filters" and "exclude_patterns" to skip stuff, those
should be used instead of us skipping things for people which may not be
wanted in some cases.

M  +20   -55   addons/project/kateprojectworker.cpp

https://invent.kde.org/utilities/kate/-/commit/8362fdac50283b4c469e4c7a509f7cd4a7add4e1
Comment 4 Johannes 2024-09-18 08:51:52 UTC
Big thanks for this super fast fix!