diff --git a/root/etc/cron.daily/purge-homes-recycle b/root/etc/cron.daily/purge-homes-recycle index e8e4d6f..a5eb67d 100644 --- a/root/etc/cron.daily/purge-homes-recycle +++ b/root/etc/cron.daily/purge-homes-recycle @@ -45,8 +45,8 @@ foreach my $user ($a->get_all_by_prop(type=>'user')){ sub remove{ # Remove files with last modification older than $retention if ( -f ){ - my $mtime = stat($_)->mtime; - (time() - $mtime > $retention) && unlink($_); + my $atime = stat($_)->atime; + (time() - $atime > $retention) && unlink($_); } # Remove empty directories elsif ( -d ){