-
Notifications
You must be signed in to change notification settings - Fork 300
Move Working Directory from System Temp to Application Data #1969
Copy link
Copy link
Open
Labels
Description
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
Reactions are currently unavailable