Skip to content

Commit

Permalink
~ Material thumbnail update bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
bbeaulant committed Jan 20, 2017
1 parent ec96714 commit 85dfff0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ladb_toolbox/ruby/controller/materials_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ def list_command()

temp_dir = @plugin.temp_dir
material_thumbnails_dir = File.join(temp_dir, 'material_thumbnails')
unless Dir.exist?(material_thumbnails_dir)
Dir.mkdir(material_thumbnails_dir)
if Dir.exist?(material_thumbnails_dir)
FileUtils.remove_dir(material_thumbnails_dir, true) # Temp dir exists we clean it
end
Dir.mkdir(material_thumbnails_dir)

data = {
:errors => [],
Expand Down

0 comments on commit 85dfff0

Please sign in to comment.