# Adding empty files to a database breaks sync silently

**URL:** <https://discourse.devontechnologies.com/t/adding-empty-files-to-a-database-breaks-sync-silently/62808>\
**Category:** DEVONthink\
**Tags:** sync, feature-request, bug-report\
**Created:** [March 8, 2021, 7:51am UTC](https://discourse.devontechnologies.com/t/adding-empty-files-to-a-database-breaks-sync-silently/62808 "2021-03-08T07:51:12Z")\
**Posts on this page:** 5\
**Page:** 2

<div class="post-metadata">

**Author:** ![ebowman](https://discourse.devontechnologies.com/letter_avatar_proxy/v4/letter/e/dbc845/32.png) [@ebowman](https://discourse.devontechnologies.com/u/ebowman)\
**Post date:** [March 10, 2021, 5:05pm UTC](https://discourse.devontechnologies.com/t/adding-empty-files-to-a-database-breaks-sync-silently/62808/22 "2021-03-10T17:05:35Z")

</div>

An empty file is a legal file type on MacOS and iOS. The fact that there is a kind of legal file which, when present, prevents sync from working seems to me indistinguishable from a bug. Are there other instances of legal files that stop sync from working? That also seems like a security risk - if somebody can share a file the contents of which interfere with how sync works, that’s a scary attack vector.

Whether it is a code bug or a design bug is a different question.

---

<div class="post-metadata">

**Author:** ![Solar-Glare](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/solar-glare/32/18874_2.png) [@Solar-Glare](https://discourse.devontechnologies.com/u/Solar-Glare)\
**Post date:** [March 10, 2021, 5:10pm UTC](https://discourse.devontechnologies.com/t/adding-empty-files-to-a-database-breaks-sync-silently/62808/23 "2021-03-10T17:10:31Z")

</div>

The sync intentionally stops to prevent possible damage to files in certain circumstances:

> [@Adding empty files to a database breaks sync silently](https://discourse.devontechnologies.com/t/adding-empty-files-to-a-database-breaks-sync-silently/62808/2):
>
> A brief bit of recent history: with the introduction of DTTG3 a number of users noticed that a small number of files were being damaged in the sense that they continued to exist but had no content. They were 0 kb in size, and became dubbed “ghost files”. The reasons for the damage are - to my knowledge - still under investigation, but are assumed to be due to a bug in a long past version of DTTG2 which propagated via the sync store. One of the mitigations implemented by DEVONtech was to include …

---

<div class="post-metadata">

**Author:** ![BLUEFROG](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/bluefrog/32/135_2.png) [@BLUEFROG](https://discourse.devontechnologies.com/u/BLUEFROG)\
**Post date:** [March 10, 2021, 5:21pm UTC](https://discourse.devontechnologies.com/t/adding-empty-files-to-a-database-breaks-sync-silently/62808/24 "2021-03-10T17:21:35Z")

</div>

The point that the OS allows zero-byte files isn’t the issue. The issue is there can be zero-byte files that are problematic in a database, hence the sync is inhibited to avoid passing along any inconsistencies.

As I said, we are considering some modifications to allow for certain use cases.

---

<div class="post-metadata">

**Author:** ![ebowman](https://discourse.devontechnologies.com/letter_avatar_proxy/v4/letter/e/dbc845/32.png) [@ebowman](https://discourse.devontechnologies.com/u/ebowman)\
**Post date:** [March 11, 2021, 7:40am UTC](https://discourse.devontechnologies.com/t/adding-empty-files-to-a-database-breaks-sync-silently/62808/25 "2021-03-11T07:40:53Z")

</div>

Is it fair to say there was a bug in DT which led to data loss (specifically by setting files in certain circumstances to zero-length and then replicating those modifications), and that the fix was to disallow replication of zero-length files? And that this has the side-effect that DT doesn’t work correctly for people whose databases contain legitimate zero-length files?

If that’s an accurate summary of the situation, I would have preferred more robust communication about the issue from the start – aren’t we now in the situation where we may have lost data and we may not be aware of it, and we may even have gone and deleted the zero-length files without first taking the time to understand what data may have been lost?

Maybe you can remind us what date this bug showed up so we can explore the possibility of needing to restore from backup.

Is there a way to “diff” between two versions of a database?

---

<div class="post-metadata">

**Author:** ![cgrunenberg](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/cgrunenberg/32/7172_2.png) [@cgrunenberg](https://discourse.devontechnologies.com/u/cgrunenberg)\
**Post date:** [March 11, 2021, 7:53am UTC](https://discourse.devontechnologies.com/t/adding-empty-files-to-a-database-breaks-sync-silently/62808/26 "2021-03-11T07:53:00Z")

</div>

See [Update on potential data loss](https://discourse.devontechnologies.com/t/update-on-potential-data-loss/62075)

[Previous page](https://discourse.devontechnologies.com/t/adding-empty-files-to-a-database-breaks-sync-silently/62808.md?page=1)
