Skip to content

Commit

Permalink
Account for car skins in empty directories
Browse files Browse the repository at this point in the history
  • Loading branch information
José Benavente committed Aug 17, 2022
1 parent 539308e commit 74b0fc4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,12 @@ task :carboxes do
Dir.entries('cars').each do |f|
next if f.eql?('.') || f.eql?('..')

params_path = "cars/#{f}/parameters.txt"
params_path = if File.exist?("cars/#{f}/parameters.txt")
"cars/#{f}/parameters.txt"
else
puts "Skipped #{f}/... parameters.txt not found. It's probably a skin."
next
end
carbox_path = if File.exist?("cars/#{f}/carbox.bmp")
"cars/#{f}/carbox.bmp"
else
Expand Down

0 comments on commit 74b0fc4

Please sign in to comment.