Duplicate folders when suncing Win - Linux (Folder name mistakes)

(ZiENQuiC) #1

Hi guys!

I am trying to set up Syncthing between my main windows PC and a Raspberry Pi (Raspbian light). I have a HDD connected to my router and shared on the LAN via Samba. On the Pi it is mounted as /mnt/nas. On the PC I have disk D:/ which I want to mirror completely on the network drive.

So I installed Synchting on PC and the Pi. I created a folder on the network drive: /mnt/nas/user_files and added it to Synchting on the Pi. On windows PC I added the whole drive d:/ as a folder with the same Folder ID.

Problem: on the Pi side everything is good. But on the Windows side I get duplicate folders if they have spaces in their names. For instance I have a folder named: 0. xxx yyy. When syncing I get a duplicate of the same folder but the name is different: ‘0. xxx yyy’. This only happens on the windows side. On the network drive I only have 1 folder named: 1. yyy xxx and on windows side I will get 2 of the same folders, but with different names: 1. yyy xxx + ‘1. yyy xxx’.

Any help is appreciated.


Do you mean the duplicate name is the original one surrounded with quotes ?

Also, are you aware Linux is case sensitive when Win is not, so an other question is: did you rename say something like 1. Yyy xxx to 1. yyy xxx on any side ? To prevent issues in this case, you should rename using 2 steps with at least one out the 6 first characters to be different (not only case) from the original (e.g to 1. ayy xxx) then let sync, then rename to the final 1. yyy xxx.

This is because of the underlying heigth-dot-three windows mechanism that will end in the same (say 1. yyy~1) for 2 successive names of the same dir|file

(ZiENQuiC) #3

Yes, the duplicates are the same folders but in single quotes. Same like they appear in linux if you do a LS command.

And I did not rename anything. The folders are the same. The only difference is that linux is handling space in the name by adding single quotes.

Every time I run Syncthing its treating the folders in quotes as different folders.


File systems on both win & nux sides ?

(Audrius Butkevicius) #5

Syncthing does not modify names, so your problem is somewhere else.


Which syncthing versions are you running on the devices?

(ZiENQuiC) #7

On both sides I have NTFS partitions. Syncthing version on windows is v1.0.1, Windows (64 bit) via SyncTrayzor. And on the Raspberry Pi its Syncthing v1.0.1 “Erbium Earthworm” (go1.11.5 linux-arm) deb@build.syncthing.net.


Did you disable 8.3 support on NTFS ? (NtfsDisable8dot3NameCreation != 0 in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem via regedit or fsutil).

btw, ST raspberry 32 or 64 bits ?

Also, maybe an expert would advise you to have ST running with “fs” log facility enabled then trigger the operation that ends in so called dup dirs then dig the log or send them…

(ZiENQuiC) #9

So I couldn’t figure out what was happening. So I deleted everything and reinstalled from scratch. This time I used the main Syncthing core in Win 10 with no GUI.

The problem went away, but now it looks like no syncing is happening. But I guess that is a problem for a different thread.