fix(server): full-size images not migrated or deleted correctly (#17308)

* fix file path logic

* update tests

* add empty array fallback just in case for now
This commit is contained in:
Mert
2025-04-01 18:11:46 -04:00
committed by GitHub
parent e4b0c00885
commit 59e5c82569
13 changed files with 84 additions and 31 deletions
+8 -2
View File
@@ -136,8 +136,14 @@ export class AuditService extends BaseService {
for await (const assets of pagination) {
assetCount += assets.length;
for (const { id, files, originalPath, encodedVideoPath, isExternal, checksum } of assets) {
const { previewFile, thumbnailFile } = getAssetFiles(files);
for (const file of [originalPath, previewFile?.path, encodedVideoPath, thumbnailFile?.path]) {
const { fullsizeFile, previewFile, thumbnailFile } = getAssetFiles(files);
for (const file of [
originalPath,
fullsizeFile?.path,
previewFile?.path,
encodedVideoPath,
thumbnailFile?.path,
]) {
track(file);
}