As this is a member of the Quarantine class,
there is no need to have "Quarantine" in the
name. This was a hang-up from the time when
it was a static.
Now we can log the enabled-state.
Change-Id: Iab1cec4d90671cda175c1d320e4f3318dd7b89a1
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Let clearOldQuarantineVersions() remove quarantined
files only when necessary and per the config settings.
Change-Id: Ie1fb18c02d61a710546e9b5962ab8b7973c2066e
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
The QuarantineMap is shared between DocBroker
instances, which makes it subject to concurrent
access and modification. As such, it must be
protected via a lock.
Change-Id: Id62587b33123748f848110a5427da3e296725de9
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Since we need both the PID of the kit process and
the document name, it's easier to construct the
quarantine instance only when we have downloaded
the document.
Change-Id: I8b537122c4b10ae6e822a82fa6a75456d0eaaaff
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
config.h should only be included in .cpp files,
never in headers. The reason is to avoid having
it accidentally included, which would also
allow for it being effective only in subsequent
code, not those included earlier.
To avoid these problems, each .cpp includes
config.h at the top, so the configuration
directives would be effective throughout
the translation unit.
Change-Id: Idae87e5ee51abe454cc2a53d6f60dc07f64d0c35
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
number of versions to maintain per file can be specified in loolwsd.xml
on exceeding specified quarantine size oldest file(s) is deleted
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I3ca55b9ab29a82988f19fe0acd43e0fae2c2a423