   #   :window - An {AtomWindow} to use for opening a selected file path.
   promptForPathToOpen: (type, {devMode, safeMode, window}) ->
     @promptForPath type, (pathsToOpen) =>
+      @lastFilePathOpened = pathsToOpen[0] if pathsToOpen.length > 0
       @openPaths({pathsToOpen, devMode, safeMode, window})
 
   promptForPath: (type, callback) ->

  resourcePath: null
  version: null
  quitting: false

  exit: (status) -> app.exit(status)


        when 'folder' then 'Open Folder'
        else 'Open'

    # If a file was previously opened, set default path to open there again.
    if @lastFilePathOpened? and type is 'file'
      openOptions.defaultPath = @lastFilePathOpened

    dialog.showOpenDialog(parentWindow, openOptions, callback)
