Method: Navaid#checkForNavaidFile
- Defined in:
- lib/navaid.rb
#checkForNavaidFile(arg) ⇒ Object
110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/navaid.rb', line 110 def checkForNavaidFile(arg) root = ENV['FG_ROOT'] root = "" if root.nil? arg="" if arg.nil? paths=[ arg, root + "/Navaids", "/usr/share/games/FlightGear/Navaids", "%ProgramFiles%/FlightGear/data/Navaids" ] paths.each do |path| if FileTest.exist?(path) then @navaidFile = path + "/nav.dat.gz" puts "Found \"#{path}\" for loading navigation aids." break end end end |