Commit 5dc9f5bd authored by IKEDA Soji's avatar IKEDA Soji
Browse files

[bug] Older CSS files won't be cleared.

Fixed by clearing older style.css* and lang.css* under $CSSDIR when they would be updated.

Note: Among files under $CSSDIR, fullPage.css*, print.css* and print-preview.css* will no longer be used nor updated. These may be removed manuallly.
parent 8126e1a5
......@@ -923,6 +923,16 @@ 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.*>) {
unless 0 == index($file, $path)
and substr($file, length $path) =~ /\A[.]\d+\z/;
next unless -f $file;
next if time - 3600 < Sympa::Tools::File::get_mtime($file);
unlink $file;
return ($url, $hash);
Supports Markdown
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