   catch
     return false
   true
-
-getBuiltInFlashPath = ->
-  builtInPath = join EXECROOT, INNER_PATH if EXECROOT?
-  builtInPath = join ROOT, INNER_PATH if not validatePath builtInPath
-  if validatePath builtInPath then builtInPath else null
 
 reVerNum = /(\d+)\.(\d+)\.(\d+)\.(\d+)/
 getNewerVersion = (ver1, ver2) ->

{app} = require 'electron'
{join} = require 'path-extra'
fs = require 'fs-extra'
{error} = require './utils'

PLATFORM = process.platform
FILENAME = switch PLATFORM
  when 'darwin' then 'PepperFlashPlayer.plugin'
  when 'linux'  then 'libpepflashplayer.so'
  when 'win32'  then 'pepflashplayer.dll'
INNER_PATH = join 'PepperFlash', PLATFORM, FILENAME

validatePath = (path) ->
  return false if typeof path isnt 'string' or not path.endsWith FILENAME

    # But it's useless here, so we just ignore it.

if process.type is 'browser'
  exports.addSource = addSource
  exports.load = load

exports.FLASH_PLAYER_FILENAME = FILENAME
exports.getFlashVersion = getFlashVersion
exports.getAllVersions = getAllVersions
