From ec96714f825afca036ebfce35018c202d02afdfd Mon Sep 17 00:00:00 2001 From: bbeaulant Date: Fri, 20 Jan 2017 13:36:28 +0100 Subject: [PATCH] ~ Material thumbnail update bugfix --- src/ladb_toolbox/ruby/controller/materials_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ladb_toolbox/ruby/controller/materials_controller.rb b/src/ladb_toolbox/ruby/controller/materials_controller.rb index d9f4841f2..263a30907 100644 --- a/src/ladb_toolbox/ruby/controller/materials_controller.rb +++ b/src/ladb_toolbox/ruby/controller/materials_controller.rb @@ -50,9 +50,9 @@ def list_command() :unknow_material_count => 0, :materials => [] } - materials.each_with_index { |material, index| + materials.each { |material| - thumbnail_file = File.join(material_thumbnails_dir, "#{index}.png") + thumbnail_file = File.join(material_thumbnails_dir, "#{SecureRandom.uuid}.png") material.write_thumbnail(thumbnail_file, 128) material_attributes = MaterialAttributes.new(material)