Synology Drive Client sync problem

Now that TransIP is discontinuing their Stack product (1 TB free storage) I had to look for another tool to sync my Arduino sketches across different machines. You have Idrive and other providers, but I also have a NAS with 5 TB in it, why not use that?

Synology has everything on board for this. The set-up was done quite quickly, as did the first synchronization folders. Only the Arduino folder in My Documents failed. No idea why. It always said : This folder is invalid.

You can find similar experiences on the internet, but not really a solution. There must be a log file or registry somewhere.
Logfile can be found here :

% localappdata% \ SynologyDrive \ Log

In UI.log I found a clue :

2020-11-15T10:27:27 (1172) [INFO] policy.cpp(129): C:\Users\Joost\Documents\Arduino is an invalid syncfolder since it has FILE_ATTRIBUTE_SYSTEM (attr = 20).

Ok, what is that attribute that prevents this sync?
Google is your friend and I found out that it means that the folder has System attributes. That’s weird.
Just to be sure I tested it with the Attrib command :

C:\Users\Joost\Documents>attrib /d /s arduino
             C:\Users\Joost\Documents\Arduino\libraries\CayenneMQTT\src\Platform\Arduino
   S         C:\Users\Joost\Documents\Arduino

As you can see, the “S” of system. How is that possible? Never mind, changed it with the attrib command in the cmd box :

attrib /d /s Arduino -S
This gives :
C:\Users\Joost\Documents>attrib /d /s arduino
             C:\Users\Joost\Documents\Arduino\libraries\CayenneMQTT\src\Platform\Arduino
             C:\Users\Joost\Documents\Arduino

Problem solved, I can add the folder to the client application for synchronisation. See image below.
(Is in Dutch, but it says My Documents\Arduino).

Sources :