# \[API\] Check for completion when ignores files prevent 100% completion?

**URL:** https://forum.syncthing.net/t/api-check-for-completion-when-ignores-files-prevent-100-completion/24175
**Category:** Support
**Created:** [April 14, 2025, 9:36pm UTC](https://forum.syncthing.net/t/api-check-for-completion-when-ignores-files-prevent-100-completion/24175 "2025-04-14T21:36:04Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![immortal192](https://forum.syncthing.net/user_avatar/forum.syncthing.net/immortal192/32/11319_2.png) [@immortal192](https://forum.syncthing.net/u/immortal192)
#### Post date: [April 14, 2025, 9:36pm UTC](https://forum.syncthing.net/t/api-check-for-completion-when-ignores-files-prevent-100-completion/24175/1 "2025-04-14T21:36:05Z")

</div>

I am suffering from [this bug](https://github.com/syncthing/syncthing/issues/7474) which probably won’t have a fix because it’s quite complicated. I was wondering in this case is it possible to still rely on the API to check for “essentially 100% completion” (ignoring ignored folders which prevent 100% completion from being reported because of the bug).

What would be the recommendation to check for “all other files except ignored folders are synced”? My existing script that runs on system startup and on system shutdown simply waits for 30 seconds and checks for 100% completion, but because it never reaches 100% for the above reason, this condition is never met. Checking arbitrarily for 99% completion is error-prone and not good enough.

Much appreciated.

---

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [April 14, 2025, 10:04pm UTC](https://forum.syncthing.net/t/api-check-for-completion-when-ignores-files-prevent-100-completion/24175/2 "2025-04-14T22:04:48Z")

</div>

Or you can simplify life by having the same ignore patterns so the devices know what to expect

---

<div class="post-metadata">

### Author: ![immortal192](https://forum.syncthing.net/user_avatar/forum.syncthing.net/immortal192/32/11319_2.png) [@immortal192](https://forum.syncthing.net/u/immortal192)
#### Post date: [April 14, 2025, 10:30pm UTC](https://forum.syncthing.net/t/api-check-for-completion-when-ignores-files-prevent-100-completion/24175/3 "2025-04-14T22:30:24Z")

</div>

@calmh I do use the same .stignore file across all devices. My issue was marked as a duplicate: [Ignored directories reported as out of sync · Issue #9804 · syncthing/syncthing · GitHub](https://github.com/syncthing/syncthing/issues/9804). This [comment](https://github.com/syncthing/syncthing/issues/7474#issuecomment-798881296) says a workaround is to “create invalid entries” which I took to mean simply ensure the ignored directories that show up as out-of-sync on all the devices exist on all devices, but they do already.

---

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [April 15, 2025, 8:39am UTC](https://forum.syncthing.net/t/api-check-for-completion-when-ignores-files-prevent-100-completion/24175/4 "2025-04-15T08:39:37Z")

</div>

> [@immortal192](#):
>
> I do use the same .stignore file across all devices.

Then that issue should have nothing to do with what you’re experiencing, which you should troubleshoot accordingly.

---

<div class="post-metadata">

### Author: ![immortal192](https://forum.syncthing.net/user_avatar/forum.syncthing.net/immortal192/32/11319_2.png) [@immortal192](https://forum.syncthing.net/u/immortal192)
#### Post date: [April 15, 2025, 4:09pm UTC](https://forum.syncthing.net/t/api-check-for-completion-when-ignores-files-prevent-100-completion/24175/5 "2025-04-15T16:09:34Z")

</div>

@calmh What other troubleshooting is needed besides already submitted issue that was immediately marked as duplicate without request for additional information along with this [thread from a year ago](https://forum.syncthing.net/t/subfolder-in-ignored-folder-is-out-of-sync/22122)?

---

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [April 16, 2025, 10:40am UTC](https://forum.syncthing.net/t/api-check-for-completion-when-ignores-files-prevent-100-completion/24175/6 "2025-04-16T10:40:43Z")

</div>

Yeah it’s not related to the issue it was supposedly a duplicate of. Showing a `syncthing cli debug file` for each level of the path down to the supposedly out of sync item might shed some light. There is some magic going on with the unignored-sub-path thing because the intermediate directories need to be represented somehow even though they’re supposed to be ignored.

---

<div class="post-metadata">

### Author: ![system](https://forum-uploads.syncthingcdn.net/original/2X/0/0b50e0a202b22ae6a67190759e8c868805b8ed9f.png) [@system](https://forum.syncthing.net/u/system)
#### Post date: [May 16, 2025, 10:41am UTC](https://forum.syncthing.net/t/api-check-for-completion-when-ignores-files-prevent-100-completion/24175/7 "2025-05-16T10:41:37Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
