lib/flashplayer/task.rb in flashplayer-10.1.3.pre vs lib/flashplayer/task.rb in flashplayer-10.1.6.pre
- old
+ new
@@ -25,12 +25,14 @@
def execute *args
super
#puts ">> invoke with: #{args} and input: #{input}"
update_input_if_necessary
- update_mm_config
- update_trust_config_with input
+ execute_safely do
+ update_mm_config
+ update_trust_config_with input
+ end
player_thread = launch_player_with input
tail_flashlog player_thread
end
def logger=(logger)
@@ -43,9 +45,17 @@
def logger
@logger
end
private
+
+ def execute_safely
+ begin
+ yield if block_given?
+ rescue FlashPlayer::PathError => e
+ logger.puts ">> [WARNING] It seems this was the first time FlashPlayer was launched on this system and as a result, the expected folders were not found. Please close the Player and run again - this message should only ever be displayed once."
+ end
+ end
def update_input_if_necessary
return if input.match(/\.swf$/)
prerequisites.each do |prereq|
if(prereq.match(/\.swf$/))