mirror of
https://github.com/troglobit/finit.git
synced 2026-11-23 20:11:44 +00:00
tmpfiles: age 0 cleans everything
An entry with the age 0 was read as having no age, so nothing in its
directory was ever cleaned:
d /var/spool/work - - - 0
tmpfiles --clean t.conf
In tmpfiles.d(5) age 0 means everything in the directory is removed
on each clean. parse_age() returned 0 for both.
It now returns -1 for no age and for one it cannot read, and with
age 0 the timestamps are not looked at.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
3 files changed
+29
-12
No files matched your search
@@ -53,3 +53,14 @@ CONF
|
||||
assert_left $DIR/keep "all dir "
|
||||
assert_left $DIR/keep/all "file "
|
||||
assert_left $DIR/keep/dir ""
|
||||
|
||||
sep
|
||||
say 'Age 0 removes everything, no age nothing'
|
||||
run "mkdir -p $DIR/zero $DIR/none; touch $DIR/zero/file $DIR/none/file"
|
||||
clean <<CONF
|
||||
d $DIR/zero - - - 0
|
||||
d $DIR/none - - - -
|
||||
d $DIR/none
|
||||
CONF
|
||||
assert_left $DIR/zero ""
|
||||
assert_left $DIR/none "file "
|
||||
Reference in new issue
Block a user