diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/repository.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index 77765cae1a0..72769498872 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -267,6 +267,9 @@ class Repository # Remove archives older than 2 hours def clean_old_archives repository_downloads_path = Gitlab.config.gitlab.repository_downloads_path + + return unless File.directory?(repository_downloads_path) + Gitlab::Popen.popen(%W(find #{repository_downloads_path} -not -path #{repository_downloads_path} -mmin +120 -delete)) end |