Skip to content

Deleting a project does not delete files on disk. #868

@flinfo

Description

@flinfo

Context

Studio name: Flux
Zou version: 0.19.12
Zou installation type: self-hosted

Describe the bug
When a project is closed and then subsequently deleted, the associated files in /opt/zou/previews/ are not removed.

Expected behavior
I would expect all files on disk that are associated to a project would be deleted when the project is deleted.
This may not actually be the intended/expected behaviour?

This does bring up the idea that exporting a project (db and associated files) would be useful. It would seem most kitsu rustlers/managers will need/want this facility eventually.

Note. Environment="REMOVE_FILES=True" is present in zou.service as per issue 648 (#648)

In the meantime, Claude produced a python script that can delete orphaned files that are no longer associated with any projects ("id" column in "preview_file" table vs files on disk). DB name, username and pw need changing, and it currently just prints orphaned filenames, but uncomment the "os.remove(file)" line to action the deleting.

zou_deleteOrphanedFiles.zip

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions