Setup Dialog: Terminate sync if the new folder is a an actual folder.
Setupwizard: Close the database in case of moving the folder.
Merging work branch for a bug fix for bug #2379.

It closes all db connections if the new local path is a already
synced folder path.