From fd61cd08ceb6d05b6e1bf103c60add02bdd3edbe Mon Sep 17 00:00:00 2001
From: Nick Thomas <gitlab@ur.gs>
Date: Thu, 21 Apr 2016 17:33:08 +0000
Subject: [PATCH] pages: Fix "undefined local variable or method `total_size'"
 when maximum page size is exceeded

---
 app/services/projects/update_pages_service.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/services/projects/update_pages_service.rb b/app/services/projects/update_pages_service.rb
index ceabd29fd52..45a28b46d06 100644
--- a/app/services/projects/update_pages_service.rb
+++ b/app/services/projects/update_pages_service.rb
@@ -85,7 +85,7 @@ module Projects
       public_entry = build.artifacts_metadata_entry(SITE_PATH, recursive: true)
 
       if public_entry.total_size > max_size
-        raise "artifacts for pages are too large: #{total_size}"
+        raise "artifacts for pages are too large: #{public_entry.total_size}"
       end
 
       # Requires UnZip at least 6.00 Info-ZIP.
-- 
GitLab