This commit is contained in:
Andras Schmelczer 2025-03-15 11:44:56 +00:00
commit 24a8def394
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C

View file

@ -301,6 +301,11 @@ export class Database {
);
let newDocument = this.getLatestDocumentByRelativePath(newRelativePath);
if (newDocument !== undefined && !newDocument.isDeleted) {
throw new Error(
`Document already exists at new location: ${newRelativePath}`
);
}
// It's either an invalid state of newDocument is pending deletion and we have
// to wait for it to complete.