]> git.ipfire.org Git - thirdparty/sarg.git/commit
Improve old reports deletion
authorFrederic Marchal <fmarchal@users.sourceforge.net>
Sun, 28 Sep 2014 18:23:28 +0000 (20:23 +0200)
committerFrederic Marchal <fmarchal@users.sourceforge.net>
Sun, 28 Sep 2014 18:23:28 +0000 (20:23 +0200)
commit0971b2d6cc7491724ace6b636e50f57fbf2bcfa9
tree716e421c876b62d5a8c93a0c0279cca0c569dcca
parentfc7c4a8811bc5b6f3b70c6232a854e82ad2875b1
Improve old reports deletion

Use the last modification time to sort the old reports directories. The
previously used ctime is not the creation time but the time at which the
directory meta data was last modified.

Creating the old report list don't use temporary files nor the external
sort command. Everything is kept and sorted in memory.

The code make sure the report directory looks like one of our report
directory. This is a safety to avoid deleting an unrelated directory.

Currently this safety mechanism only detects directories created with in
index_tree set to "file".
include/defs.h
lastlog.c
util.c