Skip mtime for non-existent symlink.

This commit is contained in:
Markus Reiter 2018-09-01 06:42:47 +02:00
parent 9a699ccf54
commit ae18bdf161

View File

@ -43,6 +43,8 @@ module CleanupRefinement
return false unless days
return true if days.zero?
return true if symlink? && !exist?
# TODO: Replace with ActiveSupport's `.days.ago`.
mtime < ((@time ||= Time.now) - days * 60 * 60 * 24)
end