If a folder was paused while being the next item in the scheduling
queue, the whole scheduling could get stuck.
This also fixes the progress information of paused folders possibly
getting stuck.
Introduce a global ExcludedFiles instance to avoid loading the global
exclude lists several times.
One could still add per-folder exclude lists by checking these after
the global ones.
The owncloud wizard already created the directory, but the recent addition
of FolderMan::checkPathValidityForNewFolder stopped allowing unexisting directories.
So change FolderMan::checkPathValidityForNewFolder to allow non existing directory
and whange the FolderWizard to create the directory if it does not exist.
Issue #3492
Together with the updater timer, check on linux, if the version on the
disk has still the same version string as the one that is running. If
not, restart if nothing is currently syncing.
factorize the function to check the validity of a new folder out of
the folder wizard to the FolderMan.
There is even a test for it now.
That way we can also use it in the normal wizard
* Show connection errors for all failing accounts in the tooltip.
* Don't hide the 'service unavailable' state. We don't want intrusive
pop ups, but we don't want to pretend we're syncing when we aren't.
* Show sync-running icon also for SyncPrepare state. In my tests I
very rarely saw the sync-running icon before.
application.cpp still had a global folder syncing on/off switch
when an account connected or disconnected. That couldn't work with
multiaccount.
Instead FolderMan listens to accountStateChanged messages and
schedules or de-schedules the folders for accounts that change state.
Do not pass AccountState in constructor of Folder, set with a
new method called setAccountState after creation. Thus the
parameter does not need to be passed through all over.
When the local sync target is just a drive letter (e.g. "X:\"), neither
the display of the sync status via file icon overlay, nor the creation of a
share link works. In the latter case no pop-up comes up and no server
request is done.
QDir::cleanPath() usually removes trailing slashes, but not if the path to
be cleaned is just "X:\". In that case the trailing slash is kept. This
commit accounts for that exception.
The AccountManager does not belong in the libsync because it is not
part of the synchronisation algorithm, but is just an helper class
for the UI to maintain the account and read/save the config
It was not emitted when a removed folder finished its sync,
and that left the UI in an old state sometimes.
Removing the Folder explicitly is unnecessary as a QSignalMapper
will automatically remove mappings for deleted QObjects.