Unverified Commit 25cfaffc authored by IKEDA Soji's avatar IKEDA Soji Committed by GitHub
Browse files

Merge pull request #498 from ikedas/expire_outdated_css by ikedas

WWSympa: Older CSS files would be cleared
parents 197add46 2a3aa15f
......@@ -923,6 +923,15 @@ sub _get_css_url {
# Set mtime of source template to detect update of it.
utime $template_mtime, $template_mtime, $path;
# Expire old files.
foreach my $file (<$path.*>) {
next
unless 0 == index($file, $path)
and substr($file, length $path) =~ /\A[.]\d+\z/
and -f $file;
unlink $file;
}
return ($url, $hash);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment