fix: rework file handling so we always explicitly create, overwrite or both (#12812)

This commit is contained in:
Zack Pollard
2024-09-21 00:16:53 +01:00
committed by GitHub
parent af70111645
commit 5a1a841365
7 changed files with 46 additions and 16 deletions
+1 -1
View File
@@ -529,7 +529,7 @@ export class MetadataService {
const existsOnDisk = await this.storageRepository.checkFileExists(motionAsset.originalPath);
if (!existsOnDisk) {
this.storageCore.ensureFolders(motionAsset.originalPath);
await this.storageRepository.writeFile(motionAsset.originalPath, video);
await this.storageRepository.createFile(motionAsset.originalPath, video);
this.logger.log(`Wrote motion photo video to ${motionAsset.originalPath}`);
await this.jobRepository.queue({ name: JobName.METADATA_EXTRACTION, data: { id: motionAsset.id } });
}