Syncthing (sometimes) deletes files but not folders

Hi guys,

Sometimes when I delete a folder with content, Syncthing deletes only the files and leaves the folder empty. This causes Syncthing to display that “Out of Sync” message:

02:14:03 INFO: Puller (folder “sync”, dir “New folder\test”): delete: remove \?\C:\Users\user\Sync\New folder\test: directory not empty.

Just to explain better this problem, let’s imagine we have:

Syncthing folder

folder 1

file 1 file 2

When I delete “folder 1”, Syncthing only deletes “file 1” and “file 2” on the other computer:

Syncthing folder

folder 1

Anyone knows how to fix this?

I’m using Syncthing on Windows (1# SyncTrayzor v0.11.16) and OSX (2# Syncthing Bar v0.11.16)

Thanks in advance.

1# SyncTrayzor: Windows host for Syncthing. Installer, auto-start, built-in browser, tray icon, folder watcher, and more 2# Syncthing Bar for OS-X

Well the directory is clearly not empty just as the error says.

I have been having a similar issue recently - I have many folders within a synced directoy (my music library) I have 6 peers connected in this share, occasionally when I’ve changed the music - renamed the album etc - some nodes complain that the directory isn’t empty. I then have to manually delete the files on that node before it will delete the directory. Other times it will work as expected

Well, looking at the folders, they are empty. I don’t think is some hidden file because I have the “show hidden files” option active on Windows.

Then syncthing will remove it after the next pull.

Nope. I already rebooted both computers, restarted and updated syncthing… and the only way to fix it is by manually deleting the folder or to remove the main folder from syncthing and start again.

Let me give you an example, I have this folder “out of sync” for 4-5 days now. Aparently the problem is on the “Camera” folder, which is empty and was deleted on my other computer:

No hidden files:

Yet, the main folder is out of sync:

The error is always the same:

Can you cd into the directory using the command prompt and run attrib and dir /ah Otherwise it sounds like a Go bug.

If you can hack up a few lines of code, I’d be interested what Go returns when it walks the directory.

Ahh… :stuck_out_tongue: you’re right. There is content inside the folder (for some reason windows doesn’t display them, sorry!).


C:\Users\Celso\Sync\Camera>attrib A SH C:\Users\Celso\Sync\Camera\desktop.ini A SH I C:\Users\Celso\Sync\Camera\Thumbs.db

dir /ah:

C:\Users\Celso\Sync\Camera>dir /ah Volume in drive C has no label. Volume Serial Number is CC52-3B4C

Directory of C:\Users\Celso\Sync\Camera

22/07/2015 00:14 104 desktop.ini 22/07/2015 00:14 77,824 Thumbs.db 2 File(s) 77,928 bytes 0 Dir(s) 147,447,742,464 bytes free

So, now my question is… how to avoid this? Can this be related to the fact that I have both “desktop.ini” and “Thumbs.db” on my .stignore file?

Yes it’s due to ignores, this is a known problem, and there currently isn’t a solution around it, apart from syncing these files.

I understand. Thank you for your time and help!