Console program written in C# has been running for several years as a cron job. I down load documents from a sharepoint site containing document libraries for several (~20) users. Users sync to their library on their PC's. Each library contains documents (excel and pdf) in the root as well as in sub-folders. The program connects to the site, using sharepoint credentials and then downloads all new/changed documents to our on-site server using the webclient.download method. This worked well until a couple of months ago. Now, documents in the root contain incorrect data. Documents in the sub folders have correct data. Downloading via the GUI and via sync is correct. Example document named test.txt, containing "this is text", contains this (much truncated to be able to post):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
Downloading via REST API resolves the problem for the root, I am still using the downloadfile method for sub folders