Skip to content

Move Working Directory from System Temp to Application Data #1969

@chchwy

Description

@chchwy

Currently, Pencil2D extracts .pclx files (literally a ZIP) to the system's temporary directory for working directory.

This could have two issues:

  • Data loss: System cleanup tools or OS maintenance can delete temp files at any time, e.g., on restart, during disk cleanup, or third-party tools
  • Recovery: working files in temp probably already gone after Pencil2D crashes.

Proposed Solution

Move the working directory to platform-specific application data directories QStandardPaths::AppLocalDataLocation

Platform Location
Windows C:\Users\username\AppData\Local\Pencil2D\
macOS ~/Library/Application Support/Pencil2D/
Linux ~/.local/share/Pencil2D/ (XDG_DATA_HOME)

Notes

  • Working files always persist except someone explicitly cleans it up (Good for Crash recovery)
  • AppData directories should always be writable
  • Other people cannot access the personal AppData so it has better privacy

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions