Commit graph

9 commits

Author SHA1 Message Date
Pranam Lashkari
e73cea0ff3 quarantine: automatically delete quarantined files after specified time
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Idabef2aec46d6b7c194ef06f4235b60d6ad29e4a
2021-11-17 10:43:43 +01:00
Henry Castro
c2d60f3627 wsd: rename 'lool' -> 'cool'
Change-Id: I4ece04921a0e12d4c69b2a70b563e66cc89be0a6
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-11-17 09:17:54 +01:00
Tor Lillqvist
199b608225 Improve error handling when link() fails
Use the normal convention of saving errno in a local variable right
after a system call has failed. (To be safe in case some other
irrelevant system call fails before we get to output the message for
errno.)

Use both Util::symbolicErrno() (so that a developer sees the actual
symbolic error name as in manpages and code) and strerror() (for
nominally helpful plaintext explanation of what that errno value
means) in the output.

Use explicit std:: prefix for strerror() (because that is cleaner and
it is our convention).

Use << operators in the LOG_FOO calls instead of concatenating strings
with the + operator.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I75f42051f81661eea62235019ef9a0925239ce00
2021-11-08 14:35:46 +02:00
Tor Lillqvist
07f2921c9c Fix obviously wrong strerror() usage
The parameter to strerror() should be an errno value, not the return
value from a failed system call (which is always -1 in this case).

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I61baf348988f3e6577aab30bf985e0fe646291fd
2021-11-08 14:35:46 +02:00
Andras Timar
1f4dad602f typo: missing space
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I7a25f6311f2ce5f7c20cb96eab2cb649dcdd8fa0
2021-11-04 14:23:26 +01:00
Andras Timar
531394381a Better error message when quarantining failed
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ib5722237a0f0b2962552470f35abc8e1042c9b7d
2021-11-04 14:09:51 +01:00
Pranam Lashkari
15f5ce6e52 Quarantine: minor correction for path resolution
some code cleaning for code repeatation

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I4ea7972ed711eba41c7bbcfa36b8db607ad3d738
2021-11-03 16:51:52 +05:30
Pranam Lashkari
e7c2f5cd07 quarantine: keep quarantine off by default
allow path specification for the quarantine directory

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I407288db60fe5fbf0f6a9346175c3d4acfd35add
2021-11-03 09:57:00 +02:00
Pranam Lashkari
f84df1161c quarantine: create hard links for quarantining when file is saved
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
2021-11-01 17:21:51 +02:00