public function finish()
    {
        if ($this->request->data()) {
            if (rename(ROOT . '/config/settings.php.tmp', ROOT . '/config/settings.php')) {
                snapshot();
                $this->request->session()->delete('Startup');

                if (!empty($this->request->data['home'])) {
                    $this->redirect('/');
                } else {
                    $this->redirect('/admin');
                }
            } else {
                $this->Flash->danger(__d('installer', 'Unable to continue, check write permission for the "/config" directory.'));
            }
        }

        $this->title(__d('installer', 'Finish Installation'));
    }