Bug 506995

Summary: Snap package write issue
Product: [Applications] gcompris Reporter: Jazeix Johnny <jazeix>
Component: generalAssignee: Scarlett Moore <sgmoore>
Status: RESOLVED INTENTIONAL    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Snap   
OS: Other   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Jazeix Johnny 2025-07-13 15:23:07 UTC
SUMMARY
 A user raised an issue where they can't write files on their system
with the Snap package. We have several activities that allow to write
the output (for example "sketch") on the filesystem (which should be
~/.local/share/GCompris/sketch/test.png).

We use the path:
QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation)
+ QLatin1String("/GCompris")) to set the folder name.

STEPS TO REPRODUCE
1. Open GCompris
2. Open sketch activity (the last section allows to search an activity by name)
3. Draw something, on the right panel, Save the file. The operation is told successful but the user is unable to find the file in the filesystem.

OBSERVED RESULT
No file created

EXPECTED RESULT
File should be accessible under ~/.local/share/GCompris/sketch/

SOFTWARE/OS VERSIONS
Snap version of GCompris

ADDITIONAL INFORMATION
Comment 1 Scarlett Moore 2025-07-14 12:03:06 UTC
Hi, so snaps do not allow access to . directories, they instead have their own due to sandbox restraints, the files instead go to  ~/snap/gcompris/current/.local/share/GCompris/sketch/test.png