Bug 508763 - ark does not respect plasma activity settings "tracking file and app use"
Summary: ark does not respect plasma activity settings "tracking file and app use"
Status: REPORTED
Alias: None
Product: ark
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Elvis Angelaccio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-26 13:56 UTC by morgon.kanter
Modified: 2025-11-23 21:23 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description morgon.kanter 2025-08-26 13:56:34 UTC
SUMMARY
If you create an activity that disallows "Tracking file and app use", ark still tracks the recent archives.


STEPS TO REPRODUCE
1. Create an activity that disallows "Tracking file and app use"
2. On the command line outside of KDE create a test archive: `touch testfile && tar -c testfile -z -f testfile.tar.gz`
3. Switch to the activity.
4. Open testfile.tar.gz in ark.

OBSERVED RESULT
The file appears in ark's recent files. Switching out of the activity and re-launching ark, the file still appears. What's more, it also appears in kactivitymanagerd's database:
$ sqlite .local/share/kactivitymanagerd/resources/database
sqlite> SELECT * FROM ResourceInfo WHERE TargettedResource LIKE '%testfile.tar.gz%';
/home/surgo/testfile.tar.gz|testfile.tar.gz|application/x-compressed-tar|0|0



EXPECTED RESULT
No recent file entry would be created. No entry in kactivitymanagerd database would be created.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.4.4
KDE Frameworks Version: 6.17.0
Qt Version: 6.9.1
Kernel Version: 6.16.2-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-6700K CPU @ 4.00GHz
Memory: 32 GiB of RAM (31.3 GiB usable)
Graphics Processor: NVIDIA GeForce GTX 1080
Comment 1 morgon.kanter 2025-08-26 14:10:17 UTC
I just tested this as well: it also does not respect "Clear history" from System Settings > Recent Files.
Comment 2 silverhammermba 2025-10-20 23:45:19 UTC
I dug into this a little and the root cause is pretty simple: Ark isn't using activities at all. It uses KRecentFilesMenu from kwidgetsaddons which simply stores recent files in an INI file at ~/.local/share/ark/ark_recentfiles. See https://github.com/KDE/kwidgetsaddons/blob/master/src/krecentfilesmenu.cpp#L120

I'm not sure what the right fix is. Either Ark could be updated to not use KRecentFilesMenu and instead use the activities API directly or KRecentFilesMenu could be updated to use activities itself.