toroso/fs4net — pull request #3 by carlpett (2014-03-28 16:34:55+00:00)
Title: Make FileSystem instances track their own current directory

Before this change, all FileSystem instances would have the same current directory, the same as returned by System.IO.Directory.GetCurrentDirectory. Changing directory, either through System.IO.Directory.SetCurrentDirectory or RootedDirectory.SetAsCurrent, would change the current directory for all instances, as well as the entire application.
After the change, each instance has its own current directory. It is initialized to application current directory, so should not cause breakages outside applications that mix CurrentDirectory operations on both the FileSystem instance and System.IO and expect them to be in sync.
As a bonus, this change makes the "real" file system have the same behaviour as the Memory (and Mock) FileSystem, which will make unit tests behave the same as the production code.