From d56eeb465a8c91f8874a60d5babfe7baad8071ef Mon Sep 17 00:00:00 2001 From: f Date: Fri, 29 Apr 2022 18:04:43 -0300 Subject: [PATCH] =?UTF-8?q?comprobar=20que=20los=20idiomas=20tambi=C3=A9n?= =?UTF-8?q?=20existan?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/jobs/uri_collection_job.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/jobs/uri_collection_job.rb b/app/jobs/uri_collection_job.rb index 0c5b6b1f..b6d4a21b 100644 --- a/app/jobs/uri_collection_job.rb +++ b/app/jobs/uri_collection_job.rb @@ -145,11 +145,13 @@ class UriCollectionJob < PeriodicJob uri = "/#{locale}/".squeeze('/') dir = File.join(destination, locale) + next unless File.directory? dir + files(dir).map do |f| uri + f end end - end.flatten(3) + end.flatten(3).compact end # @return [Array]