Fix file creation deduplication

This commit is contained in:
Andras Schmelczer 2025-12-07 12:44:11 +00:00
parent 9e06d99512
commit e6bfefd2d5

View file

@ -319,7 +319,7 @@ impl Database {
device_id, device_id,
has_been_merged has_been_merged
from latest_document_versions from latest_document_versions
where relative_path = ? where relative_path = ? and is_deleted = false
order by vault_update_id desc -- `latest_document_versions` only contains a single latest version of each document, however, order by vault_update_id desc -- `latest_document_versions` only contains a single latest version of each document, however,
-- multiple documents can have the same `relative_path`, if they have been deleted. That's -- multiple documents can have the same `relative_path`, if they have been deleted. That's
-- why we only care about the latest version of the document with the given relative path. -- why we only care about the latest version of the document with the given relative path.