Fix E2E test by not creating deleted files

This commit is contained in:
Andras Schmelczer 2025-05-23 21:58:01 +01:00
parent 0cd2e9175f
commit ef00174538
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C

View file

@ -45,6 +45,13 @@ export class UnrestrictedSyncer {
document.relativePath,
SyncType.CREATE,
async () => {
if (document.isDeleted) {
this.logger.debug(
`Document ${document.relativePath} has been already deleted, no need to update it`
);
return;
}
const contentBytes = await this.operations.read(
document.relativePath
); // this can throw FileNotFoundError
@ -125,7 +132,7 @@ export class UnrestrictedSyncer {
async () => {
const originalRelativePath = document.relativePath;
if (document.metadata === undefined || document.isDeleted) {
if (document.isDeleted || document.metadata === undefined) {
this.logger.debug(
`Document ${document.relativePath} has been already deleted, no need to update it`
);