rapid7/metasploit-framework — pull request #2086 by paul-e-dishman (2013-07-09 02:34:50+00:00)
Title: safari_metadata_archive.rb deletes it's cwd

Which in turn breaks msfrpcd when you request a new console.

Rectify this by restoring the working directory to where it
was at the start.

lib/rex/ui/text/shell.rb:180:in `getwd'
lib/rex/ui/text/shell.rb:180:in `run'
lib/msf/ui/web/console.rb:71:in `block in initialize'
lib/msf/core/thread_manager.rb:100:in `call'
lib/msf/core/thread_manager.rb:100:in `block in spawn'
exception during select: Rex::StreamClosedError Stream
is closed.