diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-10 08:36:11 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-10 08:36:11 +0300 |
| commit | c49f7d292e17449b122fa54252661a9a298be9a8 (patch) | |
| tree | 968d01f712dde429b42cb2b99810ce7766d06e8d /web | |
| parent | 093ab19c3bb0a9fc22bda4262d9b844241c889e4 (diff) | |
internal/service: swap GC hard-delete ordering
Remove the media file from disk before deleting the DB row so that
a failed os.Remove doesn't create an orphaned file. If the file is
already missing (os.IsNotExist), proceed with the DB deletion. Other
removal errors abort the iteration for that item.
Also update the existing ordering test to assert removal happens
before HardDeleteMedia, and add a test covering the file-remove-failure
short-circuit.
Diffstat (limited to 'web')
0 files changed, 0 insertions, 0 deletions
