     @openPathOnEvent('application:open-license', path.join(process.resourcesPath, 'LICENSE.md'))
 
     app.on 'before-quit', =>
-      @saveState() if @hasEditorWindows()
+      @saveState(false)
       @quitting = true
 
     app.on 'will-quit', =>

        console.log("Killing process #{pid} failed: #{error.code ? error.message}")
    delete @pidsToOpenWindows[pid]

  saveState: ->
    return if @quitting
    states = []
    for window in @windows
      unless window.isSpec
        if loadSettings = window.getLoadSettings()
          states.push(initialPaths: loadSettings.initialPaths)
    @storageFolder.store('application.json', states)

  hasEditorWindows: ->
    @windows.some (window) -> not window.isSpec

        app.quit()
        return
    @windows.splice(@windows.indexOf(window), 1)
    @saveState(true) unless window.isSpec

  # Public: Adds the {AtomWindow} to the global window list.
  addWindow: (window) ->
