3
0
mirror of https://github.com/spantaleev/matrix-docker-ansible-deploy.git synced 2026-03-26 06:27:23 +00:00

feat: prune empty dir when migrate to s3 storage

OTW many empty dirs are kept
This commit is contained in:
parisni
2026-02-28 22:48:08 +01:00
committed by Slavi Pantaleev
parent 46321552b7
commit 90bcb1f4ee
2 changed files with 7 additions and 0 deletions

View File

@@ -24,3 +24,8 @@ container_id=$(\
{% endfor %}
{{ devture_systemd_docker_base_host_command_docker }} start --attach $container_id
for prune_dir in "{{ matrix_synapse_storage_path }}/{{ matrix_synapse_media_store_directory_name }}/remote_content" "{{ matrix_synapse_storage_path }}/{{ matrix_synapse_media_store_directory_name }}/remote_thumbnail"; do
[ -d "$prune_dir" ] || continue
find "$prune_dir" -depth -mindepth 1 -type d -empty -print -delete
done